HIGH 7.4

CVE-2025-22228

Spring Security Does Not Enforce 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 Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.security » spring-security-crypto
< 5.7.16>= 5.8.0, < 5.8.18>= 6.0.0, < 6.0.16>= 6.1.0, < 6.1.14>= 6.2.0, < 6.2.10>= 6.3.0, < 6.3.8>= 6.4.0, < 6.4.4
5.7.16, 5.8.18, 6.0.16, 6.1.14, 6.2.10, 6.3.8, 6.4.4

Blast radius

1affected artifacts
282affected versions
13,791dependent artifacts (est.)
856,600dependent versions

59% of the dependent artifacts (8,243) still pull an affected version in their latest release.

DepthDependent versions
Direct
72,575
2 hops
149,469
3 hops
249,837
4 hops
210,337
5 hops
100,673
6 hops
73,709

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.