high7.4
CVE-2025-22228
Spring Security Does Not Enforce Password Length
Impact
BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| maven | org.springframework.security:spring-security-crypto | >= 6.3.0, < 6.3.8 | 6.3.8 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://spring.io/security/cve-2025-22228
- https://security.netapp.com/advisory/ntap-20250425-0009/
- https://github.com/advisories/GHSA-mg83-c7gq-rv5c
- https://nvd.nist.gov/vuln/detail/CVE-2025-22228
- https://github.com/spring-projects/spring-security/commit/46f0dc6dfc8402cd556c598fdf2d31f9d46cdbf3
- https://security.netapp.com/advisory/ntap-20250425-0009