CVE-2017-5638
Apache Struts vulnerable to remote arbitrary command execution due to improper input validation
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.8
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.
- Record
CVE-2017-5638- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - CVSS 2.0
- 10.0 High
AV:N/AC:L/Au:N/C:C/I:C/A:C - Weakness
- CWE-755
- Updated
- 2026-11-02
CVE List
9.8
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.
- Record
CVE-2017-5638- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-755
- Updated
- 2026-11-02
EUVDEUVD-2018-0625
9.8
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.
- Record
EUVD-2018-0625- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j77q-2qqg-6989
10.0
Apache Struts vulnerable to remote arbitrary command execution due to improper input validation
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.
- Record
GHSA-j77q-2qqg-6989- CVSS 3.0
- 10.0 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:H - Weakness
- CWE-20, CWE-755
- Updated
- 2026-11-02
CISA KEV No score
Apache Struts Remote Code Execution Vulnerability
Apache Struts Jakarta Multipart parser allows for malicious file upload using the Content-Type value, leading to remote code execution.
- Record
CVE-2017-5638- Weakness
- CWE-20
- Updated
- 2026-11-02
OSV
9.8
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.
- Record
CVE-2017-5638- CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVGHSA-j77q-2qqg-6989
10.0
Apache Struts vulnerable to remote arbitrary command execution due to improper input validation
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.
- Record
GHSA-j77q-2qqg-6989- CVSS 3.0
- 10.0 Critical
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:H - Weakness
- CWE-20, CWE-755
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
org.apache.struts:struts2-coreMaven |
2.3.0 to 2.3.31 | 2.3.32 |
org.apache.struts:struts2-coreMaven |
2.5.0 to 2.5.10 | 2.5.10.1 |
org.apache.struts:struts2-coreMaven |
2.3.0 up to 2.3.32, plus listed versions 2.3.12.3.1.12.3.1.22.3.122.3.14 Show 27 moreShow less2.3.14.12.3.14.22.3.14.32.3.152.3.15.12.3.15.22.3.15.32.3.162.3.16.12.3.16.22.3.16.32.3.202.3.20.12.3.20.32.3.242.3.24.12.3.24.32.3.282.3.28.12.3.292.3.32.3.302.3.312.3.42.3.4.12.3.72.3.8 |
2.3.32 |
org.apache.struts:struts2-coreMaven |
2.5.0 up to 2.5.10.1, plus listed versions 2.52.5.12.5.102.5.22.5.52.5.8 |
2.5.10.1 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| Exploit-DB | Apache Struts 2.3.5 < 2.3.31 / 2.5 < 2.5.10 - Remote Code Execution | 2017-03-07 |
| PoC in GitHub | Flyteas/Struts2-045-Exp | 2017-03-07 |
| PoC in GitHub | PolarisLab/S2-045 | 2017-03-07 |
| Metasploit | Apache Struts Jakarta Multipart Parser OGNL Injection | 2017-03-07 |
| PoC in GitHub | bongbongco/cve-2017-5638 | 2017-03-08 |
| PoC in GitHub | jas502n/S2-045-EXP-POC-TOOLS | 2017-03-09 |
| PoC in GitHub | btamburi/strutszeiro | 2017-03-10 |
| PoC in GitHub | immunio/apache-struts2-CVE-2017-5638 | 2017-03-10 |
| PoC in GitHub | xsscx/cve-2017-5638 | 2017-03-10 |
| PoC in GitHub | Masahiro-Yamada/OgnlContentTypeRejectorValve | 2017-03-11 |
Show 19 moreShow less
Plus 62 more. The full list has every link.
History
| Recorded | Changed | Sources |
|---|---|---|
| exploitation | ||
| exploits, exploits_more | ||
| exploits | ||
| first indexed | CVE List, EUVD, Exploit-DB, GitHub Advisories, CISA KEV, Metasploit, Nuclei, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2017-5638 is a critical vulnerability (CVSS 9.8) in Apache Struts, published March 11, 2017. CISA lists it as known to be exploited, since November 3, 2021. EUVD reports exploitation since November 3, 2021. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 100.0%, the 99th percentile. Fixed in org.apache.struts:struts2-core 2.3.32.
References
nmap.org/nsedoc/scripts/http-vuln-cve2017-5638.html
arubanetworks.com/assets/alert/ARUBA-PSA-2017-002.txt
arstechnica.com/security/2017/03/critical-vulnerability-under-massive-attack-imperils-high-impact-sites
exploit-db.com/exploits/41570
security.netapp.com/advisory/ntap-20170310-0001
github.com/rapid7/metasploit-framework/issues/8064
Show 40 moreShow less
struts.apache.org/docs/s2-046.html
blog.talosintelligence.com/2017/03/apache-0-day-exploited.html
imperva.com/blog/2017/03/cve-2017-5638-new-remote-code-execution-rce-vulnerability-in-apache-struts-2
h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbgn03733en_us
kb.cert.org/vuls/id/834067
isc.sans.edu/diary/22169
struts.apache.org/docs/s2-045.html
securitytracker.com/id/1037973
eweek.com/security/apache-struts-vulnerability-under-attack.html
securityfocus.com/bid/96729
twitter.com/theog150/status/841146956135124993
github.com/mazen160/struts-pwn
packetstormsecurity.com/files/141494/S2-45-poc.py.txt
symantec.com/security-center/network-protection-security-advisories/SA145
support.lenovo.com/us/en/product_security/len-14200
git1-us-west.apache.org/repos/asf?p=struts.git%3Ba=commit%3Bh=352306493971e7d5a756d61780d57a76eb1f519a
h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbhf03723en_us
git1-us-west.apache.org/repos/asf?p=struts.git%3Ba=commit%3Bh=6b8272ce47160036ed120a48345d9aa884477228
cwiki.apache.org/confluence/display/WW/S2-045
exploit-db.com/exploits/41614
cwiki.apache.org/confluence/display/WW/S2-046
oracle.com/technetwork/security-advisory/cpujul2017-3236622.html
h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbgn03749en_us
blog.trendmicro.com/trendlabs-security-intelligence/cve-2017-5638-apache-struts-vulnerability-remote-code-execution
lists.apache.org/thread.html/r6d03e45b81eab03580cf7f8bb51cb3e9a1b10a2cc0c6a2d3cc92ed0c%40%3Cannounce.apache.org%3E
lists.apache.org/thread.html/r90890afea72a9571d666820b2fe5942a0a5f86be406fa31da3dd0922%40%3Cannounce.apache.org%3E
lists.apache.org/thread.html/r1125f3044a0946d1e7e6f125a6170b58d413ebd4a95157e4608041c7%40%3Cannounce.apache.org%3E
cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-5638
nvd.nist.gov/vuln/detail/CVE-2017-5638
git1-us-west.apache.org/repos/asf?p=struts.git;a=commit;h=352306493971e7d5a756d61780d57a76eb1f519a
git1-us-west.apache.org/repos/asf?p=struts.git;a=commit;h=6b8272ce47160036ed120a48345d9aa884477228
github.com/advisories/GHSA-j77q-2qqg-6989
lists.apache.org/thread.html/r1125f3044a0946d1e7e6f125a6170b58d413ebd4a95157e4608041c7@%3Cannounce.apache.org%3E
lists.apache.org/thread.html/r6d03e45b81eab03580cf7f8bb51cb3e9a1b10a2cc0c6a2d3cc92ed0c@%3Cannounce.apache.org%3E
lists.apache.org/thread.html/r90890afea72a9571d666820b2fe5942a0a5f86be406fa31da3dd0922@%3Cannounce.apache.org%3E
github.com/apache/struts/commit/352306493971e7d5a756d61780d57a76eb1f519a
github.com/apache/struts/commit/b06dd50af2a3319dd896bf5c2f4972d2b772cf2b
web.archive.org/web/20170311203630/http://www.securityfocus.com/bid/96729
web.archive.org/web/20170921030226/http://www.securitytracker.com/id/1037973
github.com/apache/struts