CVE-2026-25726

CVE-2026-25726 is a high-severity security vulnerability in github.com/cloudreve/Cloudreve/v4 (go), affecting versions < 4.0.0-20260205113604-ec9fdd33bc54. It is fixed in 4.0.0-20260205113604-ec9fdd33bc54.

Summary

Workarounds

If an immediate upgrade is not possible, administrators must manually rotate the critical secrets in the configuration file to invalidate potential exploits:

  1. Stop the Cloudreve service.
  2. In Cloudreve database, locate secret_key setting.
  3. Replace the value with a long, random string (e.g., generated via openssl rand -base64 64).
  4. Restart the Cloudreve service.

Note: This will log out all currently active users.

Resources

Impact

This vulnerability affects Cloudreve instances that were first deployed/initialized with versions prior to V4.10.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.

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.

CVE-2026-25726 has a CVSS score of 8.1 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (4.0.0-20260205113604-ec9fdd33bc54); upgrading removes the vulnerable code path.

Affected versions

github.com/cloudreve/Cloudreve/v4 (< 4.0.0-20260205113604-ec9fdd33bc54)

Security releases

github.com/cloudreve/Cloudreve/v4 → 4.0.0-20260205113604-ec9fdd33bc54 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

The issue has been addressed in version 4.13.0.
This patch introduces a migration mechanism that automatically:

  1. Invalidate the existing secret_key.
  2. Regenerate a new, cryptographically secure secret_key using crypto/rand.

Users should upgrade to 4.13.0 immediately.

Frequently Asked Questions

  1. What is CVE-2026-25726? CVE-2026-25726 is a high-severity security vulnerability in github.com/cloudreve/Cloudreve/v4 (go), affecting versions < 4.0.0-20260205113604-ec9fdd33bc54. It is fixed in 4.0.0-20260205113604-ec9fdd33bc54.
  2. How severe is CVE-2026-25726? CVE-2026-25726 has a CVSS score of 8.1 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/cloudreve/Cloudreve/v4 are affected by CVE-2026-25726? github.com/cloudreve/Cloudreve/v4 (go) versions < 4.0.0-20260205113604-ec9fdd33bc54 is affected.
  4. Is there a fix for CVE-2026-25726? Yes. CVE-2026-25726 is fixed in 4.0.0-20260205113604-ec9fdd33bc54. Upgrade to this version or later.
  5. Is CVE-2026-25726 exploitable, and should I be worried? Whether CVE-2026-25726 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-25726 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-25726? Upgrade github.com/cloudreve/Cloudreve/v4 to 4.0.0-20260205113604-ec9fdd33bc54 or later.

Other vulnerabilities in github.com/cloudreve/Cloudreve/v4

Stop the waste.
Protect your environment with Kodem.