CVE-2017-5638: Apache Struts · Remote code execution
Exploitation: In the wild · CVSS 9.8 Critical · Unauthenticated · Published 2017-03-11
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.
Enclave's analysis
Apache Struts 2's Jakarta Multipart parser mishandles errors during file uploads. A crafted Content-Type, Content-Disposition or Content-Length header gives unauthenticated remote command execution. It was exploited in the wild in March 2017, public exploits are everywhere, and CISA lists known ransomware use. Upgrade to Struts 2.3.32 or 2.5.10.1 or later, and check vendor products that bundle Struts.
Fix
Upgrade Apache Struts 2 (2.3.x) to 2.3.32; Apache Struts 2 (2.5.x) to 2.5.10.1; Aruba ClearPass Policy Manager to 6.6.5. No fixed version is listed for Apache Struts, HP Server Automation, IBM Storwize V3500, V5000, V7000 firmware and others; follow the vendor advisory.
Affected versions
| Product | Vulnerable | Fixed in |
|---|---|---|
| Apache Struts | 2.3.x before 2.3.32 | Not listed |
| Apache Struts | 2.5.x before 2.5.10.1 | Not listed |
| Apache Struts 2 (2.3.x) | 2.3.x before 2.3.32 (NVD and OSV CPE ranges start at 2.2.3) | 2.3.32 |
| Apache Struts 2 (2.5.x) | 2.5.x before 2.5.10.1 | 2.5.10.1 |
| Aruba ClearPass Policy Manager | Before 6.6.5 | 6.6.5 |
| HP Server Automation | 9.1.0, 10.0.0, 10.1.0, 10.2.0, 10.5.0 | Not listed |
| IBM Storwize V3500, V5000, V7000 firmware | 7.7.1.6 and 7.8.1.0 | Not listed |
| Lenovo Storage V5030 firmware | 7.7.1.6 and 7.8.1.0 | Not listed |
| Oracle WebLogic Server | 10.3.6.0.0, 12.1.3.0.0, 12.2.1.1.0, 12.2.1.2.0 | Not listed |