Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) Affecting github.com/hfo4/cloudreve/service/user package, versions <4.13.0


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.38% (30th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMHFO4CLOUDREVESERVICEUSER-15930482
  • published8 Apr 2026
  • disclosed31 Mar 2026
  • creditorenyomtov

Introduced: 31 Mar 2026

CVE-2026-25726  (opens in a new tab)
CWE-338  (opens in a new tab)

How to fix?

Upgrade github.com/HFO4/cloudreve/service/user to version 4.13.0 or higher.

Overview

Affected versions of this package are vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) seeded with predictable values in the secret_key and hash_id_salt. An attacker can gain unauthorized access to any user account, including administrators, by brute-forcing the PRNG seed using publicly available account creation times and validating the seed with known hash IDs. This enables the attacker to forge valid authentication tokens and escalate privileges.

Note:

This is only exploitable if the instance was initially deployed with a version prior to 4.10.0, even if later upgraded.

Workaround

This vulnerability can be mitigated by manually rotating the critical secrets in the configuration file, replacing them with long, random values, and restarting the service.

CVSS Base Scores

version 4.0
version 3.1