Spring Boot Weak PRNG in Random Value Property Source (before 4.0.6)
CVE-2026-40975 Published on April 27, 2026
Values produced by ${random.value} are not suitable for use as secrets. ${random.uuid} is not affected. ${random.int} and ${random.long} should never be used for secrets as they are numeric values with a predictable range. Affected: Spring Boot 4.0.04.0.5 (fix 4.0.6), 3.5.03.5.13 (fix 3.5.14), 3.4.03.4.15 (fix 3.4.16), 3.3.03.3.18 (fix 3.3.19), 2.7.02.7.32 (fix 2.7.33); random value property source / weak PRNG for secrets. Versions that are no longer supported are also affected per vendor advisory.
Vulnerability Analysis
CVE-2026-40975 can be exploited with network access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have a high impact on confidentiality, with no impact on integrity, and no impact on availability.
Weakness Types
Use of Insufficiently Random Values
The software uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. When software generates predictable values in a context requiring unpredictability, it may be possible for an attacker to guess the next value that will be generated, and use this guess to impersonate another user or access sensitive information.
What is a PRNG Vulnerability?
The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
CVE-2026-40975 has been classified to as a PRNG vulnerability or weakness.
Products Associated with CVE-2026-40975
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2026-40975 are published in these products:
Affected Versions
Spring Boot:- Version 4.0.0 and below 4.0.6 is affected.
- Version 3.5.0 and below 3.5.14 is affected.
- Version 3.4.0 and below 3.4.16 is affected.
- Version 3.3.0 and below 3.3.19 is affected.
- Version 2.7.0 and below 2.7.33 is affected.
- Version 1779528224 and below * is unaffected.
- Version 1779359423 and below * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.