CVE-2026-25726: Github.com/cloudreve/Cloudreve/v4 Cloudreve Is Vulnerable To Account Vulnerability
HIGHCVE-2026-25726 is a HIGH (CVSS 8.1) cloudreve is vulnerable to account vulnerability (CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)) affecting Github.com/cloudreve/Cloudreve/v4 libraries in the Go ecosystem. The issue involves cloudreve is vulnerable to account takeover via weak cryptographic token generation (insecure prng seeding). Remediation is available by upgrading affected packages to version 4.0.0-20260205113604-ec9fdd33bc54.
CVE-2026-25726 at a Glance
Security Impact
CVSS: 8.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-25726
To remediate this vulnerability, upgrade all affected Github.com/cloudreve/Cloudreve/v4 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/cloudreve/Cloudreve/v4 to 4.0.0-20260205113604-ec9fdd33bc54
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/cloudreve/Cloudreve/v4
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-25726, inspect your project dependencies for Github.com/cloudreve/Cloudreve/v4:
inspect dependencies for github.com/cloudreve/Cloudreve/v4
Analyze the terminal output to locate any version of Github.com/cloudreve/Cloudreve/v4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.0-20260205113604-ec9fdd33bc54), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG), where the product uses a pseudo-random number generator (prng) in a security context, but the prng's algorithm is not cryptographically strong. In Github.com/cloudreve/Cloudreve/v4, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-25726 Affected Github.com/cloudreve/Cloudreve/v4 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/cloudreve/Cloudreve/v4
|
Go |
< 4.0.0-20260205113604-ec9fdd33bc54
|
4.0.0-20260205113604-ec9fdd33bc54
|
References
Frequently Asked Questions
What is CVE-2026-25726?
Which Github.com/cloudreve/Cloudreve/v4 versions are affected?
What version fixes CVE-2026-25726?
Is github.com/cloudreve/Cloudreve/v4 affected?
What is the CVSS score of CVE-2026-25726?
What CWE is associated with CVE-2026-25726?
How can I check Go dependencies for CVE-2026-25726?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f8xp-wvcx-p6f4",
"modified" : "2026-04-06T23:09:44Z",
"published" : "2026-03-31T22:31:54Z",
"aliases" : [ "CVE-2026-25726" ],
"summary" : "Cloudreve is vulnerable to Account Takeover via Weak Cryptographic Token Generation (Insecure PRNG Seeding)",
"details" : "### Impact\nThis vulnerability affects **Cloudreve** instances that were **first deployed/initialized** with versions prior to V4.10.0.\n\nThe 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.\n\nAn 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.\n\n**Note**: Servers running V4.10.0+ are still vulnerable if they were originally installed using an older version, as the weak secrets persist in the configuration.\n\n### Patches\nThe issue has been addressed in version 4.13.0.\nThis patch introduces a migration mechanism that automatically:\n\n1. Invalidate the existing `secret_key`.\n2. Regenerate a new, cryptographically secure `secret_key` using crypto/rand.\n\nUsers should upgrade to 4.13.0 immediately.\n\n### Workarounds\nIf an immediate upgrade is not possible, administrators must manually rotate the critical secrets in the configuration file to invalidate potential exploits:\n\n1. Stop the Cloudreve service.\n2. In Cloudreve database, locate `secret_key` setting.\n3. Replace the value with a long, random string (e.g., generated via `openssl rand -base64 64`).\n4. Restart the Cloudreve service.\n\n_Note: This will log out all currently active users._\n\n### Resources\n* Vulnerable Code (Seeding): https://github.com/cloudreve/cloudreve/blob/87d48ac4a7acbc68064c2b9cb23793ac97f4392d/pkg/util/common.go#L21C1-L23C2\n* Vulnerable Code (Usage): https://github.com/cloudreve/cloudreve/blob/87d48ac4a7acbc68064c2b9cb23793ac97f4392d/inventory/setting.go#L591\n* [Go Documentation (math/rand)](https://pkg.go.dev/math/rand)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/cloudreve/Cloudreve/v4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.0.0-20260205113604-ec9fdd33bc54"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/cloudreve/cloudreve/security/advisories/GHSA-f8xp-wvcx-p6f4"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25726"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/cloudreve/cloudreve"
}, {
"type" : "WEB",
"url" : "https://github.com/cloudreve/cloudreve/releases/tag/4.13.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-338" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-31T22:31:54Z",
"nvd_published_at" : "2026-04-03T20:16:02Z"
}
}