CVE-2025-22228

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

State
Published
Severity
7.4 High
Published
Mar 20, 2025
Updated
Feb 26, 2026
Reserved
Jan 2, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.4 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:Nvmware

Weaknesses

Affected Products

ProductVersions
Spring SecuritySpring
  • 5.7.x to before 5.7.16Affected
  • 5.8.x to before 5.8.18Affected
  • 6.0.x to before 6.0.16Affected
  • 6.1.x to before 6.1.14Affected
  • 6.2.x to before 6.2.10Affected
  • 6.3.x to before 6.3.8Affected
  • 6.4.x to before 6.4.4Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.