Apache Struts vulnerable to remote arbitrary command execution due to improper input validation
Published 18 Oct 2018 · Updated 22 Oct 2025
Is your project on an affected org.apache.struts:struts2-core?
Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- >=2.3.0 <2.3.32
- Fixed in
- 2.3.32
mvn versions:use-dep-version -Dincludes=org.apache.struts:struts2-core -DdepVersion=2.3.32 -DforceVersion=true- Affected
- >=2.5.0 <2.5.10.1
- Fixed in
- 2.5.10.1
mvn versions:use-dep-version -Dincludes=org.apache.struts:struts2-core -DdepVersion=2.5.10.1 -DforceVersion=trueDetails
Apache Struts versions prior to 2.3.32 and 2.5.10.1 contain incorrect exception handling and error-message generation during file-upload attempts using the Jakarta Multipart parser, 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.
Is GHSA-j77q-2qqg-6989 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.apache.struts:struts2-core, and gives you the command that fixes it.
More advisories for org.apache.struts:struts2-core
- HighCVE-2025-68493Apache Struts 2 is Missing XML Validation · 11 Jan 2026
- HighCVE-2025-66675Apache Struts has a Denial of Service vulnerability · 10 Dec 2025
- HighCVE-2025-64775Apache Struts is Vulnerable to DoS via File Leak · 1 Dec 2025
- CriticalCVE-2024-53677Apache Struts file upload logic is flawed · 11 Dec 2024
- CriticalCVE-2023-50164Apache Struts vulnerable to path traversal · 7 Dec 2023
- HighCVE-2023-41835Apache Struts Improper Control of Dynamically-Managed Code Resources vulnerability · 5 Dec 2023
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2017-5638
- Linkgithub.com/rapid7/metasploit-framework/issues/8064
- Linkgithub.com/apache/struts/commit/b06dd50af2a3319dd896bf5c2f4972d2b772cf2b
- Linkgithub.com/apache/struts/commit/352306493971e7d5a756d61780d57a76eb1f519a
- Linklists.apache.org/thread.html/r6d03e45b81eab03580cf7f8bb51cb3e9a1b10a2cc0c6a2d3cc92ed0c@%3Cannounce.apache.org%3E
- Linklists.apache.org/thread.html/r90890afea72a9571d666820b2fe5942a0a5f86be406fa31da3dd0922%40%3Cannounce.apache.org%3E
- Linklists.apache.org/thread.html/r90890afea72a9571d666820b2fe5942a0a5f86be406fa31da3dd0922@%3Cannounce.apache.org%3E
- Linknmap.org/nsedoc/scripts/http-vuln-cve2017-5638.html
- Linkpacketstormsecurity.com/files/141494/S2-45-poc.py.txt
- Linksecurity.netapp.com/advisory/ntap-20170310-0001
- Linkstruts.apache.org/docs/s2-045.html
- Linkstruts.apache.org/docs/s2-046.html
- Linksupport.lenovo.com/us/en/product_security/len-14200
- Linktwitter.com/theog150/status/841146956135124993
- Linkweb.archive.org/web/20170311203630/http://www.securityfocus.com/bid/96729
- Linkweb.archive.org/web/20170921030226/http://www.securitytracker.com/id/1037973
- Linkwww.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-5638
- Linkwww.exploit-db.com/exploits/41614
- Linkwww.imperva.com/blog/2017/03/cve-2017-5638-new-remote-code-execution-rce-vulnerability-in-apache-struts-2
- Linkwww.kb.cert.org/vuls/id/834067
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.