CVE-2012-5055: Exposure of Sensitive Information in Spring Security

Summary

17/05/2022
Yes i
Moderate
Not published

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

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.8 2.0.8
  • >= 3.0.0, < 3.0.8 3.0.8
  • >= 3.1.0, < 3.1.3 3.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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for org.springframework.security:spring-security-core.

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.8 2.0.8
  • >= 3.0.0, < 3.0.8 3.0.8
  • >= 3.1.0, < 3.1.3 3.1.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback