
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-22234 is a timing attack vulnerability in Spring Security's DaoAuthenticationProvider caused by a regression introduced while fixing CVE-2025-22228. The fix for CVE-2025-22228 (related to BCryptPasswordEncoder maximum password length) inadvertently broke the timing attack mitigation, allowing unauthenticated attackers to infer valid usernames or other authentication behavior via observable response-time differences. Affected versions include Spring Security 5.7.16, 5.8.18, 6.0.16, 6.1.14, 6.2.10, 6.3.8, and 6.4.4, as well as older unsupported versions. The vulnerability was publicly disclosed on April 22, 2025, and carries a CVSS v3.1 base score of 5.3 (Medium) (Spring Advisory, Github Advisory).
The root cause is classified as CWE-208 (Observable Timing Discrepancy). Spring Security's DaoAuthenticationProvider previously implemented a constant-time dummy password check to prevent timing-based user enumeration — when a username does not exist, it still performs a password hash comparison to equalize response times. The patch for CVE-2025-22228 (which addressed BCryptPasswordEncoder's handling of passwords exceeding 72 bytes) inadvertently skipped or short-circuited this dummy check under certain conditions, reintroducing a measurable timing difference between authentication attempts for valid versus invalid usernames. No privileges or user interaction are required to exploit this flaw; an attacker only needs network access to the authentication endpoint (Spring Advisory, Github Advisory).
Successful exploitation allows unauthenticated remote attackers to enumerate valid usernames by measuring and comparing authentication response times. This confidentiality impact is limited — no passwords or session tokens are directly exposed — but valid username lists can significantly accelerate targeted credential stuffing, brute-force, or phishing campaigns. Integrity and availability are not affected by this vulnerability (Spring Advisory, Github Advisory).
No public proof-of-concept exploit code or active in-the-wild exploitation has been reported as of the time of disclosure. The EPSS score is approximately 0.022% (6th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation requires only network access and no credentials, making it accessible to low-skilled attackers, though practical exploitation depends on network conditions and the ability to make statistically significant timing measurements (Github Advisory, Spring Advisory).
Spring has released patched versions addressing this regression. Users should upgrade to the corresponding fixed version as soon as possible:
As interim mitigations, implement rate limiting and account lockout on authentication endpoints to reduce the practical effectiveness of timing-based enumeration. Adding network-level controls such as a WAF or reverse proxy with request throttling can further reduce exposure (Spring Advisory).
The vulnerability received moderate community attention following the Spring advisory published on April 22, 2025. Discussions appeared on Reddit's r/netsec and r/java communities, with developers noting the irony of a security fix introducing a new vulnerability. Security news outlets including GBHackers, CyberSecurityNews, and CyberPress covered the disclosure. The issue was responsibly reported by Jonas Robl and credited in the official Spring advisory. The InfoQ Spring news roundup also highlighted the release of patched versions (Spring Advisory, Github Advisory).
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."