Miggo Logo

CVE-2022-31690: spring-security-oauth2-client vulnerable to Privilege Escalation

8.1

CVSS Score
3.1

Basic Information

EPSS Score
0.41722%
Published
11/1/2022
Updated
1/31/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.springframework.security:spring-security-oauth2-clientmaven>= 5.7.0, < 5.7.55.7.5
org.springframework.security:spring-security-oauth2-clientmaven< 5.6.95.6.9

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper scope validation in OAuth2 client flow processing. Key functions identified are:

  1. DefaultOAuth2UserService.loadUser() - Directly processes user info and authority mapping from token response
  2. OAuth2AuthorizationCodeAuthenticationProvider.authenticate() - Handles core authentication flow These functions in vulnerable versions lacked proper checks for empty scope responses, allowing attackers to bypass intended authorization constraints. The first function is higher confidence as it directly handles authority mapping from token data, while the second represents the authentication workflow entry point.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

Sprin* S**urity, v*rsions *.* prior to *.*.*, *n* *.* prior to *.*.*, *n* ol**r unsupport** v*rsions *oul* ** sus**pti*l* to * privil*** *s**l*tion un**r **rt*in *on*itions. * m*li*ious us*r or *tt**k*r **n mo*i*y * r*qu*st initi*t** *y t** *li*nt (v

Reasoning

T** vuln*r**ility st*ms *rom improp*r s*op* v*li**tion in O*ut** *li*nt *low pro**ssin*. K*y *un*tions i**nti*i** *r*: *. ****ultO*ut**Us*rS*rvi**.lo**Us*r() - *ir**tly pro**ss*s us*r in*o *n* *ut*ority m*ppin* *rom tok*n r*spons* *. O*ut***ut*oriz*t