id: CVE-2020-2140

info:
  name: Jenkin Audit Trail <=3.2 - Cross-Site Scripting
  author: j3ssie/geraldino2
  severity: medium
  description: Jenkins Audit Trail 3.2 and earlier does not escape the error message for the URL Patterns field form validation, resulting in a reflected cross-site scripting vulnerability.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the application, leading to potential data theft, session hijacking, or defacement.
  remediation: |
    Upgrade to the latest version of Jenkin Audit Trail (>=3.3) which includes a fix for this vulnerability.
  reference:
    - https://www.jenkins.io/security/advisory/2020-03-09/
    - https://nvd.nist.gov/vuln/detail/CVE-2020-2140
    - https://jenkins.io/security/advisory/2020-03-09/#SECURITY-1722
    - http://www.openwall.com/lists/oss-security/2020/03/09/1
    - https://github.com/merlinepedra25/nuclei-templates
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2020-2140
    cwe-id: CWE-79
    epss-score: 0.44807
    epss-percentile: 0.97631
    cpe: cpe:2.3:a:jenkins:audit_trail:*:*:*:*:*:jenkins:*:*
  metadata:
    max-request: 2
    vendor: jenkins
    product: audit_trail
    framework: jenkins
  tags: cve,cve2020,jenkins,xss,plugin,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/descriptorByName/AuditTrailPlugin/regexCheck?value=*j%3Ch1%3Esample"
      - "{{BaseURL}}/jenkins/descriptorByName/AuditTrailPlugin/regexCheck?value=*j%3Ch1%3Esample"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - <h1>sample

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

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