CVEs / CVE-2017-5638
CVE-2017-5638: Apache Struts Remote Code Execution Vulnerability
- Known exploited in the CISA KEV catalog since 3 Nov 2021
- critical 9.8 CVSS 3.1 (NVD)
- EPSS 99.9% chance of exploitation in the next 30 days, higher than 99% of CVEs (30 Oct 2026)
- Last changed at its sources
Are you affected? Check your servers with Stackurity: it lists the software on each server and the vulnerabilities to fix first.
Check your servers with Stackurity Already using Stackurity? Search for CVE-2017-5638
Summary
Apache Struts Jakarta Multipart parser allows for malicious file upload using the Content-Type value, leading to remote code execution.
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.
Affected and fixed versions
| Product | Affected | Fixed in |
|---|---|---|
| Apache Software Foundation Apache Struts | 2.3.x before 2.3.32 | — |
| Apache Software Foundation Apache Struts | 2.5.x before 2.5.10.1 | — |
| Product | Affected | Fixed in |
|---|---|---|
| org.apache.struts:struts2-core (Maven) | from 2.3.0, before 2.3.32 | 2.3.32 |
| org.apache.struts:struts2-core (Maven) | from 2.5.0, before 2.5.10.1 | 2.5.10.1 |
Package versions from GHSA-j77q-2qqg-6989.
Exploitation
| In CISA KEV since | 3 Nov 2021 |
|---|---|
| Due date for US federal agencies | 3 May 2022 |
| Used in ransomware campaigns | Known |
| Required action | Apply updates per vendor instructions. |
Severity
| CVSS 3.1 | 9.8 criticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HScored by NVD |
|---|---|
| Weakness | CWE-755 |
References
- CVE-2017-5638 on NVD
- CVE-2017-5638 in the CISA KEV catalog
- CVE-2017-5638 on OSV
- http://blog.talosintelligence.com/2017/03/apache-0-day-exploited.html Exploit, Third Party Advisory
- http://blog.trendmicro.com/trendlabs-security-intelligence/cve-2017-5638-apache-struts-vulnerability-remote-code-execution/ Exploit, Third Party Advisory
- http://www.arubanetworks.com/assets/alert/ARUBA-PSA-2017-002.txt Third Party Advisory
- http://www.eweek.com/security/apache-struts-vulnerability-under-attack.html Press/Media Coverage, Third Party Advisory
- http://www.oracle.com/technetwork/security-advisory/cpujul2017-3236622.html Patch, Third Party Advisory
- http://www.securityfocus.com/bid/96729 Broken Link, Third Party Advisory, VDB Entry
- http://www.securitytracker.com/id/1037973 Broken Link, Third Party Advisory, VDB Entry
- https://arstechnica.com/security/2017/03/critical-vulnerability-under-massive-attack-imperils-high-impact-sites/ Exploit, Press/Media Coverage
- https://cwiki.apache.org/confluence/display/WW/S2-045 Mitigation, Vendor Advisory
- https://cwiki.apache.org/confluence/display/WW/S2-046 Mitigation, Vendor Advisory
- https://exploit-db.com/exploits/41570 Exploit, Third Party Advisory, VDB Entry
- https://git1-us-west.apache.org/repos/asf?p=struts.git%3Ba=commit%3Bh=352306493971e7d5a756d61780d57a76eb1f519a Broken Link
- https://git1-us-west.apache.org/repos/asf?p=struts.git%3Ba=commit%3Bh=6b8272ce47160036ed120a48345d9aa884477228 Broken Link
- https://github.com/mazen160/struts-pwn Exploit
- https://github.com/rapid7/metasploit-framework/issues/8064 Exploit, Issue Tracking
- https://h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbgn03733en_us Broken Link
- https://h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbgn03749en_us Third Party Advisory
- https://h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbhf03723en_us Third Party Advisory
- https://isc.sans.edu/diary/22169 Exploit, Third Party Advisory
- https://lists.apache.org/thread.html/r1125f3044a0946d1e7e6f125a6170b58d413ebd4a95157e4608041c7%40%3Cannounce.apache.org%3E Mailing List
Sources
Exploitation status from the CISA Known Exploited Vulnerabilities catalog. EPSS scores from FIRST. Descriptions, severity and references from the National Vulnerability Database. Open-source package versions from OSV (CC-BY 4.0). Text is shown as each source states it; Stackurity does not edit it. Check the vendor's advisory before acting.
This product uses data from the NVD API but is not endorsed or certified by the NVD.