A newly identified security vulnerability, CVE-2025-22234, has exposed a critical weakness in the widely-used Spring Security framework.
According to the HeroDevs report, affecting several versions of the spring-security-crypto package, this flaw makes it possible for attackers to discern valid usernames through observable differences in login response times—an avenue for so-called “timing attacks.”
Spring Security is a cornerstone Java framework for most enterprise applications, enabling authentication, authorization, and various other security measures.
It integrates tightly with the Spring ecosystem and is valued for its flexibility and robust configuration options.
However, this latest vulnerability undermines those very protections, highlighting the delicate balance between performance and security.
The core issue arises from a recent patch (CVE-2025-22228) designed to address a different bug in the spring-security-crypto package.
Unfortunately, this update inadvertently weakened existing mitigations against timing attacks in the DaoAuthenticationProvider.
Specifically, when using the BCrypt password encoder, requests with passwords longer than 72 characters would cause the encoder to throw an exception.
This difference in system behavior makes it possible for attackers to measure how long the authentication process takes and infer whether a username exists in the system.
CVE | Product | Affected Versions | Fixed In | Patch Status |
CVE-2025-22234 | Spring Security | 5.7.16, 5.8.18, 6.0.16, 6.1.14, 6.2.10, 6.3.8, 6.4.4 | NES v5.7.18, v5.8.21 | Patch Available |
Previously, Spring Security always performed a password check, regardless of the username’s validity.
This strategy ensured that login response times were consistent, thus preventing attackers from distinguishing between valid and invalid usernames.
The new behavior, however, creates an observable disparity, increasing the risk of information exposure.
Technical Impact
Upgrading to the latest patched version of Spring Security is the best line of defense. Developers should test systems to ensure consistent response times irrespective of username validity and password length.
Find this News Interesting! Follow us on Google News, LinkedIn, & X to Get Instant Updates!
Multiple Dutch organizations have experienced significant service disruptions this week due to a series of…
A major supply chain security incident has rocked the Python open-source community as researchers at…
The Cybersecurity and Infrastructure Security Agency (CISA) has issued two new advisories revealing critical vulnerabilities…
NVIDIA has issued an urgent security advisory after discovering a significant vulnerability (CVE-2025-23254) in its…
The Cybersecurity and Infrastructure Security Agency (CISA) has issued an urgent alert regarding a newly…
A 25-year-old man from Santa Clarita, California, has agreed to plead guilty to hacking into…