What’s Vulnerable › Vulnerabilities

CVE-2025-22228: CVE-2025-22228: Spring Security BCryptPasswordEncoder does not enforce maximum password length

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.

Affected products

How to fix

Upgrade to a fixed version: Spring Security 5.7.16, 5.8.18, 6.0.16, 6.1.14. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2025-22228 or the next vulnerability affects your stack