Patchfirst
CVE-2017-5638 KEVRansomwarePublic exploit Critical · 9.8 EPSS >99.9%

Apache Struts Remote Code Execution Vulnerability

Apache · Struts

Summary

The Jakarta Multipart parser in Apache Struts 2 (versions 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1) mishandles exceptions and error messages raised during file-upload processing. An unauthenticated remote attacker with network access can execute arbitrary commands by sending a crafted Content-Type, Content-Disposition, or Content-Length HTTP header, with no user interaction or special configuration required.

Official description · NVD

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.

Breakdown
79.9 / 100
Exploited
Yes, in CISA KEV
Reports
0
Tactics
3/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. How attackers get in

  2. What they do

  3. What can follow

First seen exploited the day it was disclosed. Public exploit code (Exploit-DB) was available 4 days before disclosure.

  1. Public exploit codeExploit-DB4 days before
  2. DisclosedFirst seen exploitedVulnCheck KEV evidenceday 0
  3. Added to CISA KEVknown ransomware use; EU database agrees+5 yrs

CISA KEV listing is when exploitation was confirmed, not necessarily the first attack.

See the family tree

7 fixes in struts2-core over 15 months. The latest fix listed for struts2-core is 2.5.12.

Fixes in struts2-coreMaven package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 2.3.29CVE-2016-44384 Jul 2016
  2. 2.3.29CVE-2016-446116 Oct 2017
  3. 2.5.1CVE-2016-44363 Oct 2016
  4. 2.5.10.1CVE-2017-563811 Mar 2017KEV
  5. 2.5.11CVE-2017-1261120 Sep 2017
  6. 2.5.12CVE-2017-767213 Jul 2017
  7. 2.5.12CVE-2017-978713 Jul 2017Latest listed

techniques

3 , grouped by in kill-chain order 3

Initial AccessTA0001

Exploit Public-Facing Application T1190 Medium
MITRE CTID mapping of the KEV entry · how it is exploited

CVE-2017-5638 is a remote code execution vulnerability in Apache Struts Jakarta Multipart versions that allows for malicious file upload using Content-Type, Content-Disposition, or Content-Length HTTP headers during file-upload attempts leading to an attacker to execute arbitrary commands. This CVE was known to be exploited during the Equifax breach.

ExecutionTA0002

Command and Scripting Interpreter T1059 Medium
MITRE CTID mapping of the KEV entry · primary impact

CollectionTA0009

Data from Local System T1005 Medium
MITRE CTID mapping of the KEV entry · follow-on activity
Lower-confidence links (2)

These come from early or generic mappings, text matching, or contradict this CVE’s details (for example a public-facing technique on a bug that needs a user to open a file). Shown for completeness.

  • Exploitation for Privilege EscalationT1068 CTID attack_to_cve Phase 1 "Uncategorized" mapping (not staged by impact)
  • Exploitation for Client ExecutionT1203 server-side bug exploitable without user interaction; client-execution technique does not fit

Detection

1 rule for this CVE · 258 general rules for its techniques

Rules for this CVE

1 that reference CVE-2017-5638 directly.

General rules for this CVE’s techniques

These detect the technique in general, not this specific vulnerability.

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: org.apache.struts:struts2-core.

Mavenorg.apache.struts:struts2-coreGHSA-j77q-2qqg-6989

Upgrade to 2.5.33

Fixes this CVE and 7 other known vulnerabilities in this package (CVE-2017-12611, CVE-2018-11776, +5).

Still affected on this line by CVE-2024-53677 (fixed in 6.4.0, a newer line); CVE-2025-68493 (no fix published).

Set the version to 2.5.33 or later in your pom.xml or build.gradle.

First fixed in 2.5.10.1 for CVE-2017-5638.

Affected versions, by release line

If you runUpgrade to
2.5.0 up to 2.5.10.12.5.33first fix for this CVE: 2.5.10.1
2.3.0 up to 2.3.32

Still affected on this line by CVE-2019-0230 (fixed in 2.5.22, a newer line); CVE-2019-0233 (fixed in 2.5.22, a newer line); CVE-2020-17530 (fixed in 2.5.26, a newer line); CVE-2021-31805 (fixed in 2.5.30, a newer line); CVE-2023-50164 (fixed in 2.5.33, a newer line); CVE-2024-53677 (fixed in 6.4.0, a newer line); CVE-2025-68493 (no fix published).

2.3.35first fix for this CVE: 2.3.32

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 50 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

34 links, grouped by NVD tag (33 duplicates merged)
↑ ↓ chooseEnter openEsc close