id: pollbot-redirect

info:
  name: Mozilla Pollbot - Open Redirect
  author: Evan Rubinstien
  severity: medium
  description: Mozilla Pollbot contains an open redirect vulnerability. An attacker can redirect a user to a malicious site and possibly obtain sensitive information, modify data, and/or execute unauthorized operations.
  reference:
    - https://bugzilla.mozilla.org/show_bug.cgi?id=1753838
    - https://github.com/mozilla/PollBot
  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
    cwe-id: CWE-601
  metadata:
    max-request: 1
  tags: redirect,mozilla,pollbot

http:
  - method: GET
    path:
      - '{{BaseURL}}/%0A/interact.sh/'

    matchers-condition: and
    matchers:
      - type: regex
        part: header
        regex:
          - '(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)(?:[a-zA-Z0-9\-_\.@]*)interact\.sh\/?(\/|[^.].*)?$' # https://regex101.com/r/L403F0/1

      - type: status
        status:
          - 301

# digest: 4b0a00483046022100bc5911379b3b3b7be280dd1a6d0c2061173e59ac41be269c1a20f02435a6724f0221009c2d5fc4eac4d006e5f08476808edd93afe018ff3a9a02a0765d9c2545d0ef84:922c64590222798bb761d5b6d8e72950
