id: host-header-injection

info:
  name: Host Header Injection
  author: princechaddha
  severity: info
  description: HTTP header injection is a general class of web application security vulnerability which occurs when Hypertext Transfer Protocol headers are dynamically generated based on user input.
  reference:
    - https://portswigger.net/web-security/host-header
    - https://portswigger.net/web-security/host-header/exploiting
    - https://www.acunetix.com/blog/articles/automated-detection-of-host-header-attacks/
  metadata:
    max-request: 1
  tags: hostheader-injection,generic,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    headers:
      Host: "{{randstr}}.tld"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '{{randstr}}.tld'
        part: body
        condition: and

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