CVE-2012-5055: Exposure of Sensitive Information in Spring Security
Summary
CVE-2012-5055: Exposure of Sensitive Information to an Unauthorized Actor in Spring Security. Affects org.springframework.security:spring-security-core across 3 version ranges.
< 2.0.8
>= 3.0.0, < 3.0.8
>= 3.1.0, < 3.1.3
Fixed in 2.0.8, 3.0.8 or 3.1.3, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The package under scrutiny is org.springframework.security:spring-security-core, which is a part of the Maven ecosystem. Spring Security is a powerful and highly customizable authentication and access control framework for Java applications. It provides comprehensive security services for web applications, including authentication, authorization, and protection against common security threats. However, versions before 2.0.8, 3.0.x before 3.0.8, and 3.1.x before 3.1.3 are vulnerable to an exposure of sensitive information issue.
Vulnerability Detail
The vulnerability, identified as CVE-2012-5055, resides in the DaoAuthenticationProvider component of Spring Security. It fails to check the password if the user is not found, resulting in a shorter response delay. This flaw can be exploited by remote attackers to enumerate valid usernames through a series of login requests. By analyzing the response time, an attacker can determine whether a username exists in the system, potentially aiding in further attacks or unauthorized access.
How To Fix
Latest published version: 7.2.0-RC1 as of 23 Oct 2026
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 2.0.82.0.8 -
>= 3.0.0, < 3.0.83.0.8 -
>= 3.1.0, < 3.1.33.1.3
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a workaround, you can implement a custom authentication provider that performs a consistent amount of work, regardless of whether the user is found or not. This can help mitigate the timing-based enumeration vulnerability. Here's an example of a custom authentication provider in Spring Security:
public class CustomAuthenticationProvider implements AuthenticationProvider {
// Implement the authenticate() method to perform authentication logic
@Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {
// Perform authentication logic
// Return an Authentication object
}
// Implement the supports() method to indicate which authentication tokens are supported
@Override
public boolean supports(Class<?> authentication) {
// Return true if the authentication token is supported
}
}
Conclusion
In conclusion, the vulnerability in Spring Security allows for the exposure of sensitive information, specifically the enumeration of valid usernames. To mitigate this risk, it is crucial to upgrade to the fixed versions of Spring Security. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for org.springframework.security:spring-security-core →
FAQ
The vulnerability allows remote attackers to enumerate valid usernames by analyzing the response time of login requests. This information can be used to launch further attacks or gain unauthorized access to the system.
No, only versions before 2.0.8, 3.0.x before 3.0.8, and 3.1.x before 3.1.3 are affected by this vulnerability.
While there is no known public exploit for this vulnerability, it is still important to apply the recommended fixes to prevent potential attacks.
Yes, remote attackers can exploit this vulnerability by sending a series of login requests and analyzing the response time.
No, upgrading to the fixed versions is the recommended solution to address this vulnerability.
References
Related vulnerabilities
Recent vulnerabilities recorded for org.springframework.security:spring-security-core.