7.4High

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

Spring Spring Security Published: (1 year ago)

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.

Weakness (CWE): CWE-287

Data: CVE.org, NVD, CISA KEV, FIRST EPSS, Ubuntu. Published as the sources state it, in English.

Affected products and versions

VendorProductVersions
Spring Spring Security 5.7.x – < 5.7.16, 5.8.x – < 5.8.18, 6.0.x – < 6.0.16, 6.1.x – < 6.1.14, 6.2.x – < 6.2.10, 6.3.x – < 6.3.8, 6.4.x – < 6.4.4

References and patches