CVE-2025-22228Spring Security
High 7.4 No auth needed
Follow: this CVE · Spring · Spring Security We alert you by email or Slack (account required).
- Priority
- 59
- CVSS 3.1
- 7.4
- EPSS
- 0.6% probability of exploitation in 30 days · percentile 42
- Auth required
- No
- Published
- Mar 20, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-287
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
What happens
BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.
What to do
- Apply the vendor's security update for Spring Security.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Maven | org.springframework.security:spring-security-crypto |
≥ 6.3.0 < 6.3.8 |
6.3.8 |
— |
| Maven | org.springframework.security:spring-security-crypto |
≥ 6.4.0 < 6.4.4 |
6.4.4 |
— |
| Maven | org.springframework.security:spring-security-crypto |
≥ 6.2.0 < 6.2.10 |
6.2.10 |
— |
| Maven | org.springframework.security:spring-security-crypto |
≥ 6.1.0 < 6.1.14 |
6.1.14 |
— |
| Maven | org.springframework.security:spring-security-crypto |
≥ 6.0.0 < 6.0.16 |
6.0.16 |
— |
| Maven | org.springframework.security:spring-security-crypto |
≥ 5.8.0 < 5.8.18 |
5.8.18 |
— |
| Maven | org.springframework.security:spring-security-crypto |
< 5.7.16 |
5.7.16 |
— |
Per OSV / GitHub Advisories (GHSA-mg83-c7gq-rv5c). Check the version in your lockfile before upgrading.
Affected products
- Spring · Spring Security
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.