Description
When processing authorization requests using the whitelabel views in Spring Security OAuth 2.0.0 to 2.0.9 and 1.0.0 to 1.0.5, the response_type parameter value was executed as Spring SpEL which enabled a malicious user to trigger remote code execution via the crafting of the value for response_type.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Pivotal | Spring Security OAuth | 2.0.0 to 2.0.9, 1.0.0 to 1.0.5 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 3 repositories
-
tpt11fb/SpringVulScan ★ 153 · Jun 19, 2022
burpsuite 的Spring漏洞扫描插件。SpringVulScan:支持检测:路由泄露|CVE-2022-22965|CVE-2022-22963|CVE-2022-22947|CVE-2016-4977
-
CyberCTF/vulhub-spring-cve-2016-4977 ★ 0 · Oct 8, 2026
Vulhub spring/CVE-2016-4977: Spring Security OAuth2 Whitelabel SpEL RCE (CVE-2016-4977), run with Isoloom
-
N0b1e6/CVE-2016-4977-POC ★ 0 · Feb 17, 2020
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Spring Security OAuth2 Remote Command Execution http/cves/2016/CVE-2016-4977.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.springframework.security.oauth:spring-security-oauth2 | >= 2.0.0, < 2.0.10 | 2.0.10 | GHSA-7q9c-h23x-65fq |
| Maven | org.springframework.security.oauth:spring-security-oauth2 | >= 1.0.0, < 1.0.5 | 1.0.5 | GHSA-7q9c-h23x-65fq |
References
- https://pivotal.io/security/cve-2016-4977
- [fineract-dev] 20191016 [CVE-2016-4977] Apache Fineract remote code execution vulnerabilities fixed in v1.3.0 mailing-list
- [fineract-dev] 20191016 Re: [CVE-2016-4977] Apache Fineract remote code execution vulnerabilities fixed in v1.3.0 mailing-list
- [oss-security] 20191015 Fwd: [CVE-2016-4977] Apache Fineract remote code execution vulnerabilities fixed in v1.3.0 mailing-list
- [announce] 20191016 [CVE-2016-4977] Apache Fineract remote code execution vulnerabilities fixed in v1.3.0 mailing-list
- [fineract-dev] 20191021 Re: [CVE-2016-4977] Apache Fineract remote code execution vulnerabilities fixed in v1.3.0 mailing-list