Apache Struts Jakarta Multipart parser allows for malicious file upload using the Content-Type value, leading to remote code execution.
In short
CVE-2017-5638 (Apache Struts Remote Code Execution) has a CVSS 3.1 base score of 9.8, rated critical. CISA added it to the Known Exploited Vulnerabilities catalog on 3 Nov 2021, and it has been used in ransomware campaigns. Fixed in Apache Struts 2.3.32, Arubanetworks Clearpass Policy Manager 6.6.5 or later.
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.
CVSS 3.1 breakdown
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HAffected products
- Apache Struts≥ 2.2.3 < 2.3.32 · ≥ 2.5.0 < 2.5.10.1
- Arubanetworks Clearpass Policy Manager< 6.6.5
- HP Server Automation10.0.0 · 10.1.0 · 10.2.0 · 10.5.0
- Netapp Oncommand Balanceall versions
- Oracle Weblogic Server10.3.6.0.0 · 12.1.3.0.0 · 12.2.1.1.0 · 12.2.1.2.0
- IBM Storwize V3500 Firmware7.7.1.6 · 7.8.1.0
- IBM Storwize V5000 Firmware7.7.1.6 · 7.8.1.0
- IBM Storwize V7000 Firmware7.7.1.6 · 7.8.1.0
- Lenovo Storage V5030 Firmware7.7.1.6 · 7.8.1.0
Remediation
Fixed in- Apache Struts≥ 2.3.32
- Arubanetworks Clearpass Policy Manager≥ 6.6.5
References
- http://blog.talosintelligence.com/2017/03/apache-0-day-exploited.html
- http://blog.trendmicro.com/trendlabs-security-intelligence/cve-2017-5638-apache-struts-vulnerability-remote-code-execution/
- https://arstechnica.com/security/2017/03/critical-vulnerability-under-massive-attack-imperils-high-impact-sites/
- https://cwiki.apache.org/confluence/display/WW/S2-045
- https://cwiki.apache.org/confluence/display/WW/S2-046
- https://exploit-db.com/exploits/41570
- https://git1-us-west.apache.org/repos/asf?p=struts.git%3Ba=commit%3Bh=352306493971e7d5a756d61780d57a76eb1f519a
- https://git1-us-west.apache.org/repos/asf?p=struts.git%3Ba=commit%3Bh=6b8272ce47160036ed120a48345d9aa884477228
- https://github.com/mazen160/struts-pwn
- https://github.com/rapid7/metasploit-framework/issues/8064
and 24 more references
Related CVEs
Exploited and critical vulnerabilities in the same product or from the same vendor.
Data from the NVD, CISA KEV catalog and FIRST EPSS. The CVSS 4.0 base score is shown where the NVD has one, otherwise CVSS 3.1.
