CVE-2024-22258: Improper Authentication in Spring Authorization Server
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.24816%
CWE
Published
3/20/2024
Updated
12/5/2024
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.springframework.security:spring-security-oauth2-authorization-server | maven | < 1.1.6 | 1.1.6 |
| org.springframework.security:spring-security-oauth2-authorization-server | maven | >= 1.2.0, < 1.2.3 | 1.2.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the conditional check in CodeVerifierAuthenticator.authenticate() that previously only validated if the client required PKCE (isRequireProofKey()), but didn't account for cases where a code_verifier was provided without a corresponding code_challenge. The patch added an additional check (StringUtils.hasText(codeVerifier)) to enforce validation when either condition is true. The commit diff shows this logic change in line 99-100 of CodeVerifierAuthenticator.java, and the added test case in OAuth2AuthorizationCodeGrantTests.java confirms the attack scenario involves providing code_verifier without code_challenge for confidential clients.