Miggo Logo

CVE-2016-4977:
Spring Security OAuth vulnerable to remote code execution (RCE) via specially crafted request using whitelabel views

8.8

CVSS Score
3.0

Basic Information

EPSS Score
0.99904%
CWE
-
Published
10/18/2018
Updated
5/14/2024
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.springframework.security.oauth:spring-security-oauth2maven>= 2.0.0, < 2.0.102.0.10
org.springframework.security.oauth:spring-security-oauth2maven>= 1.0.0, < 1.0.51.0.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from SpEL evaluation of the response_type parameter during OAuth approval page rendering. The WhitelabelApprovalEndpoint's getAccessConfirmation method was responsible for exposing the raw authorizationRequest (including untrusted response_type) to Thymeleaf/FreeMarker templates. The security patch modifies this method to sanitize the response_type input, indicating this was the injection point. During exploitation, the stack trace would show this controller method processing the malicious request before SpEL evaluation occurs in the view template.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

W**n pro**ssin* *ut*oriz*tion r*qu*sts usin* t** w*it*l***l vi*ws in Sprin* S**urity O*ut* *.*.* to *.*.* *n* *.*.* to *.*.*, t** r*spons*_typ* p*r*m*t*r v*lu* w*s *x**ut** *s Sprin* Sp*L w*i** *n**l** * m*li*ious us*r to tri***r r*mot* *o** *x**utio

Reasoning

T** vuln*r**ility st*ms *rom Sp*L *v*lu*tion o* t** r*spons*_typ* p*r*m*t*r *urin* O*ut* *pprov*l p*** r*n**rin*. T** W*it*l***l*pprov*l*n*point's **t****ss*on*irm*tion m*t*o* w*s r*sponsi*l* *or *xposin* t** r*w *ut*oriz*tionR*qu*st (in*lu*in* untru