{"answers":{"affected":"4 open source packages ship an affected version, including org.springframework.security.oauth:spring-security-oauth2. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2016-4977 exists.","fix":"Upgrade org.springframework.security.oauth:spring-security-oauth2 to a fixed version for your release line: 1.0.5 or 2.0.10.","what":"CVE-2016-4977 is a high-severity code injection vulnerability in Pivotal Spring Security OAuth, published on 25 May 2017. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2016-4977 and fix it if it is affected.\n\nWhat it is: CVE-2016-4977 is a high-severity code injection vulnerability in Pivotal Spring Security OAuth, published on 25 May 2017. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2016-4977 exists.\n\nAffected packages and fixed versions:\n- org.springframework.security.oauth:spring-security-oauth2 (Maven): affected from 1.0.0; fixed in 1.0.5\n- org.springframework.security.oauth:spring-security-oauth2 (Maven): affected from 1.0.0; fixed in 1.0.5\n- org.springframework.security.oauth:spring-security-oauth2 (Maven): affected from 2.0.0; fixed in 2.0.10\n- org.springframework.security.oauth:spring-security-oauth2 (Maven): affected from 2.0.0; fixed in 2.0.10\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2016-4977/ (Markdown: https://insights.sbomify.com/CVE-2016-4977/index.md)","id":"CVE-2016-4977","markdown":"https://insights.sbomify.com/CVE-2016-4977/index.md","name":"CVE-2016-4977","record":{"aliases":["GHSA-7q9c-h23x-65fq"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Spring Security OAuth","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary code by injecting Spring SpEL expressions into the response_type parameter during authorization requests.","user_interaction":"not_required","vuln_class":"code_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"dell","cpe":[{"product":"spring_security_oauth","vendor":"pivotal"}],"cvss":{"score":8.8,"severity":"high","source":"nvd","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-19","name":null}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2020-02-17","github_poc":3,"max_poc_stars":153,"metasploit":0,"nuclei":1,"refs":[{"date":"2022-06-19T13:16:55Z","kind":"github_poc","ref":"https://github.com/tpt11fb/SpringVulScan","stars":153,"title":"burpsuite 的Spring漏洞扫描插件。SpringVulScan：支持检测：路由泄露|CVE-2022-22965|CVE-2022-22963|CVE-2022-22947|CVE-2016-4977"},{"date":"2020-02-17T09:54:50Z","kind":"github_poc","ref":"https://github.com/N0b1e6/CVE-2016-4977-POC","stars":0,"title":null},{"date":"2026-10-08T22:16:48Z","kind":"github_poc","ref":"https://github.com/CyberCTF/vulhub-spring-cve-2016-4977","stars":0,"title":"Vulhub spring/CVE-2016-4977: Spring Security OAuth2 Whitelabel SpEL RCE (CVE-2016-4977), run with Isoloom"},{"date":null,"kind":"nuclei","ref":"http/cves/2016/CVE-2016-4977.yaml","stars":null,"title":"Spring Security OAuth2 Remote Command Execution"}],"tier":"weaponised"},"has_fix":true,"headline":"Spring Security OAuth vulnerable to remote code execution (RCE) via specially crafted request using whitelabel views","id":"CVE-2016-4977","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"code_injection","year":"2016"},"n_packages":4,"n_references":6,"next":{"headline":"Apache ActiveMQ Artemis RCE Via Deserialization Gadget Chain","id":"CVE-2016-4978"},"packages":[{"ecosystem":"Maven","fixed":["1.0.5"],"introduced":["1.0.0"],"last_affected":[],"package":"org.springframework.security.oauth:spring-security-oauth2","purl":null,"source":"GHSA-7q9c-h23x-65fq"},{"ecosystem":"Maven","fixed":["1.0.5"],"introduced":["1.0.0"],"last_affected":[],"package":"org.springframework.security.oauth:spring-security-oauth2","purl":"pkg:maven/org.springframework.security.oauth/spring-security-oauth2","source":"GHSA-7q9c-h23x-65fq"},{"ecosystem":"Maven","fixed":["2.0.10"],"introduced":["2.0.0"],"last_affected":[],"package":"org.springframework.security.oauth:spring-security-oauth2","purl":null,"source":"GHSA-7q9c-h23x-65fq"},{"ecosystem":"Maven","fixed":["2.0.10"],"introduced":["2.0.0"],"last_affected":[],"package":"org.springframework.security.oauth:spring-security-oauth2","purl":"pkg:maven/org.springframework.security.oauth/spring-security-oauth2","source":"GHSA-7q9c-h23x-65fq"}],"prev":{"headline":"Apache Ambari reveals administrator passwords","id":"CVE-2016-4976"},"products":["Spring Security OAuth"],"published":"2017-05-25","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-06","vendors":["Pivotal"]},"summary":"Attackers can execute arbitrary code by injecting Spring SpEL expressions into the response_type parameter during authorization requests.","url":"https://insights.sbomify.com/CVE-2016-4977/"}