CVE-2026-25726: Cloudreve weak PRNG in security secret generation

CVE-2026-25726 · Severity: high · CVSS 8.1 · Published 2026-04-03

Cloudreve, a self-hosted file management and sharing system, contains a security flaw in how it generates its internal master keys. An attacker can mathematically predict these keys by analyzing publicly available information, such as when the administrator's account was created. If successful, an attacker can gain full control over the system, access all stored files, and impersonate any user, including administrators.

Technologies: Cloudreve, github.com/cloudreve/Cloudreve (Go), github.com/cloudreve/Cloudreve/v3 (Go), github.com/cloudreve/Cloudreve/v4 (Go). Vendors: Cloudreve, Go.

Quick answers

Is CVE-2026-25726 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-25726 being exploited in the wild.
How severe is CVE-2026-25726?
High severity, with a CVSS score of 8.1, published 3 April 2026.
Which products and versions are affected?
Cloudreve < 4.13.0; github.com/cloudreve/Cloudreve (Go) SEMVER:introduced=0; github.com/cloudreve/Cloudreve/v3 (Go) SEMVER:introduced=0; github.com/cloudreve/Cloudreve/v4 (Go) SEMVER:introduced=0,fixed=4.0.0-20260205113604-ec9fdd33bc54.
Is there a fix for CVE-2026-25726?
Yes. github.com/cloudreve/Cloudreve/v4 (Go): upgrade to 4.0.0-20260205113604-ec9fdd33bc54 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-25726 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-25726?
Check whether you run Cloudreve, github.com/cloudreve/Cloudreve (Go), github.com/cloudreve/Cloudreve/v3 (Go) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/cloudreve/Cloudreve/v4 (Go): upgrade to 4.0.0-20260205113604-ec9fdd33bc54 or later
    go get github.com/cloudreve/Cloudreve/v4@v4.0.0-20260205113604-ec9fdd33bc54

Technical details

Cloudreve prior to version 4.13.0 uses the insecure 'math/rand' PRNG seeded with 'time.Now().UnixNano()' to generate critical secrets like 'secret_key' and 'hash_id_salt' during initial setup. Because the seed is based on a predictable timestamp, an attacker can use public API endpoints to determine the administrator's account creation time and narrow the search space for the seed. By brute-forcing the seed (demonstrated to take less than 3 hours on consumer hardware), an attacker can recover the 'secret_key' and forge valid JSON Web Tokens (JWTs). This leads to unauthenticated administrative access and full system compromise. The vulnerability persists in newer versions if the instance was originally initialized with a version prior to 4.10.0.

Affected products

  • Cloudreve Cloudreve < 4.13.0

Identifiers

  • CVE-2026-25726
  • GHSA-f8xp-wvcx-p6f4
  • GO-2026-5350

Timeline

  • 2026-02-05: patched: Version 4.13.0 released with security fix.
  • 2026-03-31: advisory: Vendor security advisory published.
  • 2026-04-03: disclosed: CVE-2026-25726 published.

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.