Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in Spring Boot - CVE-2026-40975

 

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in Spring Boot - CVE-2026-40975

Published: April 27, 2026


Vulnerability identifier: #VU128234
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-40975
CWE-ID: CWE-338
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Spring
Affected software:
Spring Boot

Detailed vulnerability description

The vulnerability allows a remote attacker to disclose sensitive information and compromise integrity of secret-dependent operations.

The vulnerability exists due to the use of a weak pseudorandom number generator in the random value property source when generating values with ${random.value}. A remote attacker can predict generated values to disclose sensitive information and compromise integrity of secret-dependent operations.

${random.uuid} is not affected, and ${random.int} and ${random.long} should never be used for secrets because they are numeric values with a predictable range.


How to mitigate CVE-2026-40975

Install security update from vendor's website.

Sources