Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. org.springframework.security/spring-security-core
  4. ›
  5. CVE-2024-22257

CVE-2024-22257: Erroneous authentication pass in Spring Security

March 18, 2024 (updated February 13, 2025)

In Spring Security, versions 5.7.x prior to 5.7.12, 5.8.x prior to 5.8.11, versions 6.0.x prior to 6.0.9, versions 6.1.x prior to 6.1.8, versions 6.2.x prior to 6.2.3, an application is possible vulnerable to broken access control when it directly uses the AuthenticatedVoter#vote passing a null Authentication parameter.

Specifically, an application is vulnerable if:

The application uses AuthenticatedVoter directly and a null authentication parameter is passed to it resulting in an erroneous true return value.

An application is not vulnerable if any of the following is true:

  • The application does not use AuthenticatedVoter#vote directly.
  • The application does not pass null to AuthenticatedVoter#vote.

Note that AuthenticatedVoter is deprecated since 5.8, use implementations of AuthorizationManager as a replacement.

References

  • github.com/advisories/GHSA-f3jh-qvm4-mg39
  • github.com/spring-projects/spring-security
  • github.com/spring-projects/spring-security/commit/5a7f12f1a9fdb4edaab6f61495f1d781a7273b61
  • nvd.nist.gov/vuln/detail/CVE-2024-22257
  • security.netapp.com/advisory/ntap-20240419-0005
  • spring.io/security/cve-2024-22257

Code Behaviors & Features

Detect and mitigate CVE-2024-22257 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.7.12, all versions starting from 5.8.0 before 5.8.11, all versions starting from 6.0.0 before 6.1.8, all versions starting from 6.2.0 before 6.2.3

Fixed versions

  • 5.7.12
  • 5.8.11
  • 6.1.8
  • 6.2.3

Solution

Upgrade to versions 5.7.12, 5.8.11, 6.1.8, 6.2.3 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-287: Improper Authentication
  • CWE-862: Missing Authorization

Source file

maven/org.springframework.security/spring-security-core/CVE-2024-22257.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:16 +0000.