Apache Struts Remote Code Execution
CVE-2017-5638 is a critical-severity improper handling of exceptional conditions vulnerability in Apache Struts from Apache, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected Apache Struts versions: 2.3.x before 2.3.32; 2.5.x before 2.5.10.1. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on November 3, 2021, which means attacks have been observed in the wild, including in ransomware campaigns.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Struts to 2.3.32 or 2.5.10.1, whichever matches your release line, or a later version.
- Update Clearpass Policy Manager to 6.6.5 or a later version.
- CISA's required action: Apply updates per vendor instructions.
- Read the advisory on oracle.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Apache | Apache Struts | 2.3.x before 2.3.32; 2.5.x before 2.5.10.1 | Not stated |
| Apache | Struts | 2.2.3 up to, but not including, 2.3.32; 2.5.0 up to, but not including, 2.5.10.1 | 2.3.32, 2.5.10.1 |
| IBM | Storwize V3500 Firmware | 7.7.1.6; 7.8.1.0 | Not stated |
| IBM | Storwize V5000 Firmware | 7.7.1.6; 7.8.1.0 | Not stated |
| IBM | Storwize V7000 Firmware | 7.7.1.6; 7.8.1.0 | Not stated |
| Lenovo | Storage V5030 Firmware | 7.7.1.6; 7.8.1.0 | Not stated |
| HP | Server Automation | 9.1.0; 10.0.0; 10.1.0; 10.2.0; 10.5.0 | Not stated |
| Oracle | Weblogic Server | 10.3.6.0.0; 12.1.3.0.0; 12.2.1.1.0; 12.2.1.2.0 | Not stated |
| Aruba Networks | Clearpass Policy Manager | before 6.6.5 | 6.6.5 |
| NetApp | Oncommand Balance | Not specified in the record | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 9.8 | Critical | NVD |
| CVSS 3.1 | 9.8 | Critical | CISA (ADP) |
| CVSS 2.0 | 10.0 | High | NVD |
Official 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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Handling of Exceptional Conditions
The product does not handle or incorrectly handles an exceptional condition.
More Improper Handling of Exceptional Conditions vulnerabilities (CWE-755)
Timeline
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- CISA published its SSVC assessment (exploitation: active, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- oracle.com/technetwork/security-advisory/cpujul2017-3236622.htmlThird Party Advisory
- cwiki.apache.org/confluence/display/WW/S2-045Mitigation
- cwiki.apache.org/confluence/display/WW/S2-046Mitigation
- struts.apache.org/docs/s2-045.htmlMitigation
- struts.apache.org/docs/s2-046.htmlMitigation
Third-party and government advisories
- arubanetworks.com/assets/alert/ARUBA-PSA-2017-002.txtThird Party Advisory
- eweek.com/security/apache-struts-vulnerability-under-attack.htmlPress/Media Coverage, Third Party Advisory
- h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbgn03749en_usThird Party Advisory
- h20566.www2.hpe.com/hpsc/doc/public/display?docLocale=en_US&docId=emr_na-hpesbhf03723en_usThird Party Advisory
- security.netapp.com/advisory/ntap-20170310-0001/Third Party Advisory
- support.lenovo.com/us/en/product_security/len-14200Third Party Advisory
- imperva.com/blog/2017/03/cve-2017-5638-new-remote-code-execution-rce-vulnerability-in-apache-struts-2/Third Party Advisory
- kb.cert.org/vuls/id/834067Third Party Advisory, US Government Resource
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2017-5638US Government Resource
Technical write-ups (may include proof of concept)
- blog.talosintelligence.com/2017/03/apache-0-day-exploited.htmlExploit, Third Party Advisory
- blog.trendmicro.com/trendlabs-security-intelligence/cve-2017-5638-apache-struts-vulnerability-remote-code-exe…Exploit, Third Party Advisory
- arstechnica.com/security/2017/03/critical-vulnerability-under-massive-attack-imperils-high-impact-sites/Exploit, Press/Media Coverage
- exploit-db.com/exploits/41570Exploit, Third Party Advisory, VDB Entry
- github.com/mazen160/struts-pwnExploit
- github.com/rapid7/metasploit-framework/issues/8064Exploit, Issue Tracking
- isc.sans.edu/diary/22169Exploit, Third Party Advisory
- nmap.org/nsedoc/scripts/http-vuln-cve2017-5638.htmlExploit, Third Party Advisory
- exploit-db.com/exploits/41614/Exploit, Third Party Advisory, VDB Entry
Other references
- lists.apache.org/thread.html/r1125f3044a0946d1e7e6f125a6170b58d413ebd4a95157e4608041c7%40%3Cannounce.apache.o…Mailing List
- lists.apache.org/thread.html/r6d03e45b81eab03580cf7f8bb51cb3e9a1b10a2cc0c6a2d3cc92ed0c%40%3Cannounce.apache.o…Mailing List
- lists.apache.org/thread.html/r90890afea72a9571d666820b2fe5942a0a5f86be406fa31da3dd0922%40%3Cannounce.apache.o…Mailing List
Other vulnerabilities in Apache Struts
- 8.8 High severity
- 7.5 High severity
- 9.8 Critical severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Spotted an error? Tell us.