CVE-2025-22234 Spring Security - BCrypt Password Encoder maximum password length breaks timing attack mitigation

Medium 5.3 Published Updated

Attackers can infer valid usernames via timing differences due to a broken mitigation in Spring Security's BCrypt encoder under specific configurations.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-22234?

CVE-2025-22234 is a medium-severity vulnerability in Spring Security, published on 22 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The fix applied in CVE-2025-22228 inadvertently broke the timing attack mitigation implemented in DaoAuthenticationProvider. This can allow attackers to infer valid usernames or other authentication behavior via response-time differences under certain configurations.

Weakness: CWE-208

Which versions are affected by CVE-2025-22234?

4 open source packages ship an affected version, including org.springframework.security:spring-security-core.

PackageAffectedFixed in
org.springframework.security:spring-security-core MavenFrom 6.3.86.3.9
org.springframework.security:spring-security-core MavenFrom 6.3.86.3.9
org.springframework.security:spring-security-core MavenFrom 6.4.46.4.5
org.springframework.security:spring-security-core MavenFrom 6.4.46.4.5

How do I fix CVE-2025-22234?

Upgrade org.springframework.security:spring-security-core to a fixed version for your release line: 6.3.9 or 6.4.5.

Is CVE-2025-22234 being exploited?

There is no known exploitation of CVE-2025-22234 in the wild and no public exploit code.

Sources

Also known as CLSA-2025-1754525015, GHSA-vqxh-445g-37fc, MINI-5h5q-p2m5-f2gc, MINI-7mf5-6q3c-8rh6, MINI-8794-24gr-ffq5.

Is CVE-2025-22234 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free