CVE-2025-22228
HIGH 7.4CVSS 3.1Spring Security Does Not Enforce Password Length
BCryptPasswordEncoder.matches(CharSequence,String) will incorrectly return true for passwords larger than 72 characters as long as the first 72 characters are the same.
- Published
- 20 Mar 2025
- Last modified
- 10 Sep 2026
- Assigned by
- security@vmware.com
- NVD status
- Deferred
- Weakness
- CWE-287CWE-521
- Also known as
- GHSA-mg83-c7gq-rv5c
- Sources
- NVDJSONOSV GHSA-mg83-c7gq-rv5cJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security@vmware.com (Secondary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Maven | org.springframework.security:spring-security-crypto | >= 6.3.0, < 6.3.8 | 6.3.8 |
| OSV | Maven | org.springframework.security:spring-security-crypto | >= 6.4.0, < 6.4.4 | 6.4.4 |
| OSV | Maven | org.springframework.security:spring-security-crypto | >= 6.2.0, < 6.2.10 | 6.2.10 |
| OSV | Maven | org.springframework.security:spring-security-crypto | >= 6.1.0, < 6.1.14 | 6.1.14 |
| OSV | Maven | org.springframework.security:spring-security-crypto | >= 6.0.0, < 6.0.16 | 6.0.16 |
| OSV | Maven | org.springframework.security:spring-security-crypto | >= 5.8.0, < 5.8.18 | 5.8.18 |
| OSV | Maven | org.springframework.security:spring-security-crypto | < 5.7.16 | 5.7.16 |
References
- https://spring.io/security/cve-2025-22228 · WEB
- https://security.netapp.com/advisory/ntap-20250425-0009/ · WEB
- 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
History
- 25 Nov 2026 20:57 UTC · NVD: first stored (published 20 Mar 2025)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 20 Mar 2025)