CVE-2023-50164 Apache Struts: File upload component had a directory traversal vulnerability
Attackers can exploit directory traversal in file uploads to upload malicious files and execute remote code, requiring an upgrade to patched Struts versions.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-50164?
CVE-2023-50164 is a critical path traversal vulnerability in Apache Struts, published on 7 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An attacker can manipulate file upload params to enable paths traversal and under some circumstances this can lead to uploading a malicious file which can be used to perform Remote Code Execution. Users are recommended to upgrade to versions Struts 2.5.33 or Struts 6.3.0.2 or greater to fix this issue.
Weakness: CWE-552
Which versions are affected by CVE-2023-50164?
4 open source packages ship an affected version, including org.apache.struts:struts2-core. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.struts:struts2-core Maven | From 2.0.0 | 2.5.33 |
org.apache.struts:struts2-core Maven | From 2.0.0 | 2.5.33 |
org.apache.struts:struts2-core Maven | From 6.0.0 | 6.3.0.2 |
org.apache.struts:struts2-core Maven | From 6.0.0 | 6.3.0.2 |
Products include Apache Struts.
How do I fix CVE-2023-50164?
Upgrade org.apache.struts:struts2-core to a fixed version for your release line: 2.5.33 or 6.3.0.2.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2023-50164 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-50164 exists.
Public exploit code: 15 proofs of concept on GitHub.
Other vulnerabilities in Apache Struts
Sources
Also known as GHSA-2j39-qcjm-428w.