CVE-2024-22257:
Erroneous authentication pass in Spring Security
8.2
CVSS ScoreBasic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.springframework.security:spring-security-core | maven | < 5.7.12 | 5.7.12 |
org.springframework.security:spring-security-core | maven | >= 5.8.0, < 5.8.11 | 5.8.11 |
org.springframework.security:spring-security-core | maven | >= 6.0.0, < 6.1.8 | 6.1.8 |
org.springframework.security:spring-security-core | maven | >= 6.2.0, < 6.2.3 | 6.2.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability occurs when AuthenticatedVoter.vote
is called with a null Authentication
parameter. The commit 5a7f12f1a9fdb4edaab6f61495f1d781a7273b61
addresses this by modifying the isFullyAuthenticated
method, which is called by vote
. The patch adds a null check for the authentication
parameter in isFullyAuthenticated
. Therefore, AuthenticatedVoter.vote
is the public-facing vulnerable function as it's the one an application would call directly with the problematic null input, and AuthenticatedVoter.isFullyAuthenticated
is the function that contained the specific logical flaw (missing null check) that led to the vulnerability. Both functions would appear in a runtime profile during the exploitation of this vulnerability. The changes in the test file AuthenticatedVoterTests.java
further confirm that the vote
method's behavior with a null Authentication
was the scenario being fixed.