Skip to content

In-depth lesson · Host header injection

Root causes

Every point the Host header injection reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 16 of 16
  1. The reset URL is built from the client-supplied Host header instead of a fixed server-side value.

    Seen in 14 reports
  2. The backend accepts X-Forwarded-Host from untrusted external requests instead of only from a trusted proxy.

    Seen in 7 reports
  3. The host validation regex lacks an end anchor, so crafted hostnames still match.

    Seen in 1 report
  4. Validation only checks that the host contains a substring such as localhost rather than matching the exact domain.

    Seen in 1 report
  5. The cookie Domain attribute is set from the client-supplied Host header without validation.

    Seen in 1 report
  6. The reset code's strength depends on whether a client-supplied redirect URL is present, and old codes are never invalidated.

    Seen in 1 report
  7. Rate limiting and IP restrictions trust the X-Forwarded-For header without checking the request came from a trusted proxy.

    Seen in 1 report
  8. User-supplied email addresses are inserted into email headers without stripping newline characters.

    Seen in 1 report
  9. The support process treats the visible sender address of an email as proof of ownership without verifying authenticity.

    Seen in 1 report
  10. The forgot-password flow acts on an email address without proving the requester owns the account.

    Seen in 1 report
  11. Drupal's RequestContext sets a safe host then overrides it with the incoming Host header.

    Seen in 1 report
  12. The media upload blacklist does not include the .html extension.

    Seen in 1 report
  13. The network allows IPv6 router advertisements and WPAD, and LDAP signing and channel binding are not enforced.

    Seen in 1 report
  14. The reset link is built from a user-supplied redirect parameter without checking it against an allowlist.

    Seen in 1 report
  15. The reset API reflects a user-supplied 'to' parameter into the link without validation.

    Seen in 1 report
  16. The server trusts a client-supplied host value when building the emailed login link, and after the fix still trusts a client-supplied path segment.

    Seen in 1 report