Description
Spring Security versions 4.2.x prior to 4.2.12, 5.0.x prior to 5.0.12, and 5.1.x prior to 5.1.5 contain an insecure randomness vulnerability when using SecureRandomFactoryBean#setSeed to configure a SecureRandom instance. In order to be impacted, an honest application must provide a seed and make the resulting random material available to an attacker for inspection.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Spring | Spring Security | 5.0 – < 5.0.11.RELEASE, 5.1 – < 5.1.4.RELEASE, 4.2 – < 4.2.11.RELEASE | 5.0.11.RELEASE |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 8 | libspring-security-2.0-java | 2.0.7.RELEASE-3+deb8u1 | DLA-1794-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.springframework.security:spring-security-core | >= 4.2.0, < 4.2.12 | 4.2.12 | GHSA-v2r2-7qm7-jj6v |
| Maven | org.springframework.security:spring-security-core | >= 5.0.0, < 5.0.12 | 5.0.12 | GHSA-v2r2-7qm7-jj6v |
| Maven | org.springframework.security:spring-security-core | >= 5.1.0, < 5.1.5 | 5.1.5 | GHSA-v2r2-7qm7-jj6v |
Advisories 1
- DLA-1794-1 libspring-security-2.0-java - security update Debian Security (DSA / DLA) · Mar 9, 2026