Skip to main content

OpenSSL CVE-2026-25726

HIGH
Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) (CWE-338)
2026-03-31 https://github.com/cloudreve/cloudreve GHSA-f8xp-wvcx-p6f4
8.1
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
8.1 HIGH
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
Patch released
Apr 01, 2026 - 02:30 nvd
Patch available
Analysis Generated
Mar 31, 2026 - 22:32 vuln.today
CVE Published
Mar 31, 2026 - 22:31 nvd
HIGH 8.1

DescriptionGitHub Advisory

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.

Patches

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.

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

  • Vulnerable Code (Seeding): https://github.com/cloudreve/cloudreve/blob/87d48ac4a7acbc68064c2b9cb23793ac97f4392d/pkg/util/common.go#L21C1-L23C2
  • Vulnerable Code (Usage): https://github.com/cloudreve/cloudreve/blob/87d48ac4a7acbc68064c2b9cb23793ac97f4392d/inventory/setting.go#L591
  • Go Documentation (math/rand)

AnalysisAI

Weak pseudo-random number generation in Cloudreve enables JWT forgery and complete account takeover on instances initialized before v4.10.0. Attackers can brute-force the PRNG seed (achievable in under 3 hours on consumer hardware) by obtaining administrator creation timestamps via public APIs and validating against known hashids, then forge valid JWTs for any user including administrators. No public exploit confirmed at time of analysis, though detailed attack methodology is disclosed. CVSS 8.1 (High) reflects network-accessible privilege escalation despite high attack complexity requiring cryptographic brute-forcing.

Technical ContextAI

Cloudreve is a self-hosted cloud storage system written in Go. The vulnerability stems from using Go's math/rand package seeded with time.Now().UnixNano() (a predictable timestamp) instead of crypto/rand for generating security-critical secrets during initial deployment. Specifically, the secret_key used for JWT signing and hash_id_salt are derived from this weak PRNG. This violates CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator). The math/rand package is explicitly documented as unsuitable for security purposes. The seed space is constrained by the administrator account creation timestamp (publicly accessible via API), reducing brute-force complexity from theoretical billions of nanoseconds to a practical 3-hour window. Once the seed is recovered by validating against known hashids, attackers can regenerate the secret_key and craft arbitrary JWTs, bypassing authentication entirely. The vulnerable code persists across upgrades because secrets are database-persisted from initial deployment, meaning servers upgraded from pre-4.10.0 remain exploitable until secrets are manually rotated.

RemediationAI

Upgrade immediately to Cloudreve version 4.13.0, which includes automatic migration to regenerate the secret_key using cryptographically secure crypto/rand and invalidate legacy weak secrets. Download the patched release from https://github.com/cloudreve/cloudreve/releases/tag/4.13.0. For environments where immediate upgrade is not feasible, manually rotate secrets as a temporary mitigation: stop the Cloudreve service, access the database to locate the secret_key setting, replace its value with a cryptographically strong random string (generate via openssl rand -base64 64 or equivalent), and restart the service. Note that manual rotation will terminate all active user sessions. Organizations must address this on any instance ever initialized with pre-4.10.0 versions regardless of subsequent upgrades, as vulnerable secrets persist until explicitly regenerated. Complete advisory details at https://github.com/cloudreve/cloudreve/security/advisories/GHSA-f8xp-wvcx-p6f4.

CVE-2014-0160 HIGH POC
7.5 Apr 07

The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packe

CVE-2014-0195 MEDIUM POC
6.8 Jun 05

The dtls1_reassemble_fragment function in d1_both.c in OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2016-0800 MEDIUM POC
5.9 Mar 01

The SSLv2 protocol, as used in OpenSSL before 1.0.1s and 1.0.2 before 1.0.2g and other products, requires a server to se

CVE-2015-0204 MEDIUM POC
4.3 Jan 09

The ssl3_get_key_exchange function in s3_clnt.c in OpenSSL before 0.9.8zd, 1.0.0 before 1.0.0p, and 1.0.1 before 1.0.1k

CVE-2014-3566 LOW POC
3.4 Oct 15

The SSL protocol 3.0, as used in OpenSSL through 1.0.1i and other products, uses nondeterministic CBC padding, which mak

CVE-2016-2107 MEDIUM POC
5.9 May 05

The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a

CVE-2015-1793 MEDIUM POC
6.5 Jul 09

The X509_verify_cert function in crypto/x509/x509_vfy.c in OpenSSL 1.0.1n, 1.0.1o, 1.0.2b, and 1.0.2c does not properly

CVE-2022-3602 HIGH
7.5 Nov 01

A buffer overrun can be triggered in X.509 certificate verification, specifically in name constraint checking. Rated hig

CVE-2014-3470 MEDIUM
4.3 Jun 05

The ssl3_send_client_key_exchange function in s3_clnt.c in OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before

CVE-2017-3730 HIGH POC
7.5 May 04

In OpenSSL 1.1.0 before 1.1.0d, if a malicious server supplies bad parameters for a DHE or ECDHE key exchange then this

CVE-2016-8610 HIGH
7.5 Nov 13

A denial of service flaw was found in OpenSSL 0.9.8, 1.0.1, 1.0.2 through 1.0.2h, and 1.1.0 in the way the TLS/SSL proto

Share

CVE-2026-25726 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy