{"answers":{"affected":"4 open source packages ship an affected version, including org.apache.struts:struts2-core. It affects 9 products.","exploited":"Yes. Attackers have exploited CVE-2017-5638 in the wild since at least 3 Nov 2021, including in ransomware campaigns.","fix":"Upgrade org.apache.struts:struts2-core to a fixed version for your release line: 2.3.32 or 2.5.10.1. US federal agencies must fix it by 3 May 2022.","what":"CVE-2017-5638 is a critical command injection vulnerability in Apache Struts, published on 11 Mar 2017. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2017-5638 and fix it if it is affected.\n\nWhat it is: CVE-2017-5638 is a critical command injection vulnerability in Apache Struts, published on 11 Mar 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: Yes. Attackers have exploited CVE-2017-5638 in the wild since at least 3 Nov 2021, including in ransomware campaigns.\n\nAffected packages and fixed versions:\n- org.apache.struts:struts2-core (Maven): affected from 2.3.0; fixed in 2.3.32\n- org.apache.struts:struts2-core (Maven): affected from 2.3.0; fixed in 2.3.32\n- org.apache.struts:struts2-core (Maven): affected from 2.5.0; fixed in 2.5.10.1\n- org.apache.struts:struts2-core (Maven): affected from 2.5.0; fixed in 2.5.10.1\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-2017-5638/ (Markdown: https://insights.sbomify.com/CVE-2017-5638/index.md)","id":"CVE-2017-5638","markdown":"https://insights.sbomify.com/CVE-2017-5638/index.md","name":"CVE-2017-5638","record":{"aliases":["GHSA-j77q-2qqg-6989"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Java web framework","requires_auth":"none","summary":"Remote attackers can execute arbitrary commands via crafted HTTP headers in Apache Struts, requiring immediate upgrade to patched versions.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"apache","cpe":[{"product":"struts","vendor":"apache"},{"product":"clearpass_policy_manager","vendor":"arubanetworks"},{"product":"server_automation","vendor":"hp"},{"product":"storwize_v3500_firmware","vendor":"ibm"},{"product":"storwize_v5000_firmware","vendor":"ibm"},{"product":"storwize_v7000_firmware","vendor":"ibm"},{"product":"storage_v5030_firmware","vendor":"lenovo"},{"product":"oncommand_balance","vendor":"netapp"},{"product":"weblogic_server","vendor":"oracle"}],"cvss":{"score":9.8,"severity":"critical","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-755","name":"Improper Handling of Exceptional Conditions"}],"description":"The Jakarta Multipart parser in Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 has incorrect exception handling and error-message generation during file-upload attempts, which allows remote attackers to execute arbitrary commands via a crafted Content-Type, Content-Disposition, or Content-Length HTTP header, as exploited in the wild in March 2017 with a Content-Type header containing a #cmd= string.","ecosystems":["Maven"],"exploits":{"exploitdb":2,"first_seen":"2017-03-07","github_poc":87,"max_poc_stars":443,"metasploit":1,"nuclei":1,"refs":[{"date":"2017-03-12T02:02:25Z","kind":"github_poc","ref":"https://github.com/mazen160/struts-pwn","stars":443,"title":"An exploit for Apache Struts CVE-2017-5638"},{"date":"2017-03-07T10:30:20Z","kind":"github_poc","ref":"https://github.com/Flyteas/Struts2-045-Exp","stars":61,"title":"Struts2 S2-045（CVE-2017-5638）Exp with GUI"},{"date":"2017-03-10T21:33:25Z","kind":"github_poc","ref":"https://github.com/immunio/apache-struts2-CVE-2017-5638","stars":34,"title":"Demo Application and Exploit"},{"date":"2017-03-09T19:40:47Z","kind":"github_poc","ref":"https://github.com/jas502n/S2-045-EXP-POC-TOOLS","stars":25,"title":"S2-045 漏洞 POC-TOOLS   CVE-2017-5638"},{"date":"2017-03-07T05:30:30Z","kind":"github_poc","ref":"https://github.com/PolarisLab/S2-045","stars":23,"title":"Struts2 S2-045（CVE-2017-5638）Vulnerability environment - http://www.mottoin.com/97954.html"},{"date":"2017-03-10T16:56:14Z","kind":"github_poc","ref":"https://github.com/xsscx/cve-2017-5638","stars":22,"title":"Example PoC Code for CVE-2017-5638 | Apache Struts Exploit "},{"date":"2017-03-21T05:47:49Z","kind":"github_poc","ref":"https://github.com/jas502n/st2-046-poc","stars":21,"title":"st2-046-poc  CVE-2017-5638"},{"date":"2017-03-12T06:28:51Z","kind":"github_poc","ref":"https://github.com/ret2jazzy/Struts-Apache-ExploitPack","stars":16,"title":"These are just some script which you can use to detect and exploit the Apache Struts Vulnerability (CVE-2017-5638)"}],"tier":"exploited"},"has_fix":true,"headline":"Apache Struts Remote Code Execution","id":"CVE-2017-5638","indexable":true,"kev":{"dateAdded":"2021-11-03","dueDate":"2022-05-03","knownRansomwareCampaignUse":"Known","product":"Struts","requiredAction":"Apply updates per vendor instructions.","vendorProject":"Apache","vulnerabilityName":"Apache Struts Remote Code Execution Vulnerability"},"kind":"cve","links":{"ecosystem":"Maven","product":"apache:struts","products":["apache:struts","arubanetworks:clearpass_policy_manager","netapp:oncommand_balance","oracle:weblogic_server"],"type":"command_injection","year":"2017"},"n_packages":4,"n_references":33,"next":{"headline":"DO NOT USE THIS CANDIDATE NUMBER.","id":"CVE-2017-5639"},"packages":[{"ecosystem":"Maven","fixed":["2.3.32"],"introduced":["2.3.0"],"last_affected":[],"package":"org.apache.struts:struts2-core","purl":null,"source":"GHSA-j77q-2qqg-6989"},{"ecosystem":"Maven","fixed":["2.3.32"],"introduced":["2.3.0"],"last_affected":[],"package":"org.apache.struts:struts2-core","purl":"pkg:maven/org.apache.struts/struts2-core","source":"GHSA-j77q-2qqg-6989"},{"ecosystem":"Maven","fixed":["2.5.10.1"],"introduced":["2.5.0"],"last_affected":[],"package":"org.apache.struts:struts2-core","purl":null,"source":"GHSA-j77q-2qqg-6989"},{"ecosystem":"Maven","fixed":["2.5.10.1"],"introduced":["2.5.0"],"last_affected":[],"package":"org.apache.struts:struts2-core","purl":"pkg:maven/org.apache.struts/struts2-core","source":"GHSA-j77q-2qqg-6989"}],"prev":{"headline":"Uncontrolled Resource Consumption in Apache ZooKeeper","id":"CVE-2017-5637"},"products":["Apache Struts"],"published":"2017-03-11","related":[{"cvss_score":9.8,"headline":"Apache Struts Remote Code Execution","id":"CVE-2020-17530","kev_date_added":"2021-11-03","published":"2020-12-11"},{"cvss_score":9.8,"headline":"Apache Struts 1 Improper Input Validation","id":"CVE-2017-9791","kev_date_added":"2022-02-10","published":"2017-07-10"},{"cvss_score":9.8,"headline":"Apache Struts 2 Improper Input Validation","id":"CVE-2012-0391","kev_date_added":"2022-01-21","published":"2012-01-08"},{"cvss_score":8.1,"headline":"Apache Struts Remote Code Execution","id":"CVE-2018-11776","kev_date_added":"2021-11-03","published":"2018-08-22"},{"cvss_score":8.1,"headline":"Apache Struts Deserialization of Untrusted Data","id":"CVE-2017-9805","kev_date_added":"2021-11-03","published":"2017-09-15"},{"cvss_score":8.1,"headline":"Apache Struts Command Injection","id":"CVE-2016-3081","kev_date_added":"2026-10-08","published":"2016-04-26"}],"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":"open","licence":"CC0 1.0","name":"CISA KEV"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"active","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-10-21","vendors":["Apache Software Foundation"]},"summary":"Remote attackers can execute arbitrary commands via crafted HTTP headers in Apache Struts, requiring immediate upgrade to patched versions.","url":"https://insights.sbomify.com/CVE-2017-5638/"}