Miggo Logo

CVE-2024-22258: Improper Authentication in Spring Authorization Server

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.24816%
Published
3/20/2024
Updated
12/5/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.springframework.security:spring-security-oauth2-authorization-servermaven< 1.1.61.1.6
org.springframework.security:spring-security-oauth2-authorization-servermaven>= 1.2.0, < 1.2.31.2.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Sprin* *ut*oriz*tion S*rv*r v*rsions *.*.* - *.*.*, *.*.* - *.*.*, *.*.* - *.*.* *n* ol**r unsupport** v*rsions *r* sus**pti*l* to * PK** *own*r*** *tt**k *or *on*i**nti*l *li*nts. Sp**i*i**lly, *n *ppli**tion is vuln*r**l* w**n * *on*i**nti*l *li*n

Reasoning

T** vuln*r**ility st*ms *rom t** *on*ition*l ****k in *o**V*ri*i*r*ut**nti**tor.*ut**nti**t*() t**t pr*viously only v*li**t** i* t** *li*nt r*quir** PK** (isR*quir*Proo*K*y()), *ut *i*n't ***ount *or **s*s w**r* * *o**_v*ri*i*r w*s provi*** wit*out *