GitHub Advisoryadvisory · Maven
GHSA-mg83-c7gq-rv5c Spring Security Does Not Enforce Password Length
HIGH
Official page ↗
- Aliases
- CVE-2025-22228
- Ecosystem
- Maven
- Packages
- org.springframework.security:spring-security-crypto
- Severity
- High
- CVSS vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
- Weaknesses
- CWE-287, CWE-521
- Reviewed
- 2025-03-20
Affected packages
• Maven org.springframework.security:spring-security-crypto: >= 6.3.0, < 6.3.8 → fixed in 6.3.8
• Maven org.springframework.security:spring-security-crypto: >= 6.4.0, < 6.4.4 → fixed in 6.4.4
• Maven org.springframework.security:spring-security-crypto: >= 6.2.0, < 6.2.10 → fixed in 6.2.10
• Maven org.springframework.security:spring-security-crypto: >= 6.1.0, < 6.1.14 → fixed in 6.1.14
• Maven org.springframework.security:spring-security-crypto: >= 6.0.0, < 6.0.16 → fixed in 6.0.16
• Maven org.springframework.security:spring-security-crypto: >= 5.8.0, < 5.8.18 → fixed in 5.8.18
• Maven org.springframework.security:spring-security-crypto: < 5.7.16 → fixed in 5.7.16
Description
BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.
Related
Alias · CVE (1)
- CVE-2025-22228 BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the… vulnerability
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-22228 advisory
- https://github.com/spring-projects/spring-security/commit/46f0dc6dfc8402cd556c598fdf2d31f9d46cdbf3 web
- https://github.com/spring-projects/spring-security package
- https://security.netapp.com/advisory/ntap-20250425-0009 web
- https://spring.io/security/cve-2025-22228 web