CVE-2026-25726 Details
Description
Cloudreve is a self-hosted file management and sharing system. Prior to version 4.13.0, the application uses the weak pseudo-random number generator math/rand seeded with time.Now().UnixNano() to generate critical security secrets, including the secret_key, and hash_id_salt. These secrets are generated upon first startup and persisted in the database. An attacker can exploit this by obtaining the administrator's account creation time (via public API endpoints) to narrow the search window for the PRNG seed, and use known hashid to validate the seed. By brute-forcing the seed (demonstrated to take <3 hours on general consumer PC), an attacker can predict the secret_key. This allows them to forge valid JSON Web Tokens (JWTs) for any user, including administrators, leading to full account takeover and privilege escalation. This issue has been patched in version 4.13.0.
A vulnerability allowing account takeover has been identified in Cloudreve, a self-hosted file management and sharing system, in versions prior to 4.13.0. The issue arises because the application uses a weak pseudo-random number generator, math/rand, seeded with time.Now().UnixNano(), to create critical security secrets such as secret_key and hash_id_salt. These secrets are generated during the initial startup and stored in the database. An attacker can exploit this vulnerability by obtaining the administrator's account creation time through public API endpoints, which helps narrow down the search for the PRNG seed. By using a known hashid to validate the seed, an attacker can brute-force the seed— a process demonstrated to take less than three hours on a typical consumer PC. Successfully predicting the secret_key allows the attacker to forge valid JSON Web Tokens (JWTs) for any user, including administrators, resulting in full account takeover and privilege escalation.
Users are advised to upgrade to Cloudreve version 4.13.0, which addresses the vulnerability by using a cryptographically secure random number generator for sensitive fields. If an immediate upgrade is not possible, administrators can manually rotate the critical secrets in the configuration file to invalidate potential exploits. This involves stopping the Cloudreve service, replacing the existing secret_key value in the database with a long, random string, and then restarting the service. Note that this workaround will log out all active users.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Apr 4, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/cloudreve/cloudreve/releases/tag/4.13.0 | [email protected] | ProductRelease Notes |
| https://github.com/cloudreve/cloudreve/security/advisories/GHSA-f8xp-wvcx-p6f4 | [email protected] | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| cloudreve cloudreve | < 4.13.0 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 13, 2026 | Initial Analysis | [email protected] |
| Apr 3, 2026 | New CVE Received | [email protected] |