CVE-2024-22257 Erroneous authentication pass in Spring Security

High 8.2 Published Updated

Developers using Spring Security must upgrade to prevent broken access control when AuthenticatedVoter#vote is called with null authentication.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-22257?

CVE-2024-22257 is a high-severity missing authorization vulnerability in Spring Security, published on 18 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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.

Weakness: CWE-862

Which versions are affected by CVE-2024-22257?

8 open source packages ship an affected version, including org.springframework.security:spring-security-core.

PackageAffectedFixed in
org.springframework.security:spring-security-core MavenAll versions5.7.12
org.springframework.security:spring-security-core MavenAll versions5.7.12
org.springframework.security:spring-security-core MavenFrom 5.8.05.8.11
org.springframework.security:spring-security-core MavenFrom 5.8.05.8.11
org.springframework.security:spring-security-core MavenFrom 6.0.06.1.8
org.springframework.security:spring-security-core MavenFrom 6.0.06.1.8
2 more packages
org.springframework.security:spring-security-core MavenFrom 6.2.06.2.3
org.springframework.security:spring-security-core MavenFrom 6.2.06.2.3

How do I fix CVE-2024-22257?

Upgrade org.springframework.security:spring-security-core to a fixed version for your release line: 5.7.12, 5.8.11, 6.1.8 or 6.2.3.

Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.

Is CVE-2024-22257 being exploited?

There is no known exploitation of CVE-2024-22257 in the wild and no public exploit code.

Sources

Also known as CLEANSTART-2026-WY50072, CLSA-2024-1727308812, ECHO-a103-74de-c83b, GHSA-f3jh-qvm4-mg39, RHLW-2026-779e7aa7bc83a4c5, ROOT-APP-MAVEN-CVE-2024-22257.

Is CVE-2024-22257 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free