Description
The REST Plugin in Apache Struts 2.1.1 through 2.3.x before 2.3.34 and 2.5.x before 2.5.13 uses an XStreamHandler with an instance of XStream for deserialization without any type filtering, which can lead to Remote Code Execution when deserializing XML payloads.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Apache Software Foundation | Apache Struts | Apache Struts before 2.3.34 and 2.5.x before 2.5.13 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Apache Struts 2 REST Plugin XStream RCE
exploit/multi/http/struts2_rest_xstream
Exploit-DB 1
- Apache Struts 2.5 < 2.5.12 - REST Plugin XStream Remote Code Execution EDB-42627 · remote · Sep 6, 2017
GitHub 20 repositories · most starred shown
-
mazen160/struts-pwn_CVE-2017-9805 ★ 247 · Sep 9, 2017
An exploit for Apache Struts CVE-2017-9805
-
luc10/struts-rce-cve-2017-9805 ★ 60 · Sep 6, 2017
CVE 2017-9805
-
chrisjd20/cve-2017-9805.py ★ 21 · Dec 4, 2017
Better Exploit Code For CVE 2017 9805 apache struts
-
0x00-0x00/-CVE-2017-9805 ★ 15 · Nov 24, 2017
Exploit script for Apache Struts2 REST Plugin XStream RCE (CVE-2017-9805)
-
Lone-Ranger/apache-struts-pwn_CVE-2017-9805 ★ 5 · Sep 10, 2017
An exploit for Apache Struts CVE-2017-9805
-
Shakun8/CVE-2017-9805 ★ 3 · Oct 3, 2022
CVE-2017-9805 POC
-
hahwul/struts2-rce-cve-2017-9805-ruby ★ 3 · Sep 7, 2017
cve -2017-9805
-
jongmartinez/-CVE-2017-9805- ★ 1 · Nov 28, 2020
Exploit script for Apache Struts2 REST Plugin XStream RCE (CVE-2017-9805)
-
UbuntuStrike/struts_rest_rce_fuzz-CVE-2017-9805- ★ 1 · Aug 31, 2019
Simple python script to fuzz site for CVE-2017-9805
-
BeyondCy/S2-052 ★ 1 · Nov 28, 2017
CVE-2017-9805 - Exploit
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Apache Struts2 S2-052 - Remote Code Execution http/cves/2017/CVE-2017-9805.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | org.apache.struts:struts2-rest-plugin | >= 2.1.1, < 2.3.34 | 2.3.34 | GHSA-gg9m-fj3v-r58c |
| Maven | org.apache.struts:struts2-rest-plugin | >= 2.5.0, < 2.5.13 | 2.5.13 | GHSA-gg9m-fj3v-r58c |
References
- http://www.oracle.com/technetwork/security-advisory/alert-cve-2017-9805-3889403.html
- https://struts.apache.org/docs/s2-052.html
- 1039263 vdb-entry
- 100609 vdb-entry
- 20170907 Multiple Vulnerabilities in Apache Struts 2 Affecting Cisco Products: September 2017 vendor-advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1488482
- https://blogs.apache.org/foundation/entry/apache-struts-statement-on-equifax
- 42627 exploit
- https://lgtm.com/blog/apache_struts_CVE-2017-9805
- https://cwiki.apache.org/confluence/display/WW/S2-052
- https://security.netapp.com/advisory/ntap-20170907-0001/
- VU#112992 third-party-advisory