Skip to content

In-depth lesson · Host header injection

Bypasses and variations

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 20 of 20
  1. Add a second Host header to the reset request.

    Seen in 2 reports
  2. Put your own domain at the start of the Host header followed by the real domain, then append a colon and the real domain again.

    Seen in 1 report
  3. Add a trailing full stop to the Host header to get past validation.

    Seen in 1 report
  4. Use an IDN homograph of the target domain in X-Forwarded-Host.

    Seen in 1 report
  5. Use a value containing localhost in X-Forwarded-Host to satisfy a substring check.

    Seen in 1 report
  6. Use the target domain as a prefix of your own domain to get a 200 response.

    Seen in 1 report
  7. Use a question mark in the Host header to bypass a subdomain check.

    Seen in 1 report
  8. Use a crafted host value that still matches a regex lacking an end anchor.

    Seen in 1 report
  9. Add line wrapping to a duplicated Host header to turn a 400 into a 200.

    Seen in 1 report
  10. Access the origin server directly to bypass the CDN's host header protection.

    Seen in 1 report
  11. Find the origin IP with a certificate search and send the poisoned request there.

    Seen in 1 report
  12. Use a Host header trick to get past WAF rules on a recovery flow.

    Seen in 1 report
  13. Change the Host header to a beta subdomain to skip the 2FA check.

    Seen in 1 report
  14. Spoof X-Forwarded-For with varying addresses to get past IP-based rate limiting.

    Seen in 1 report
  15. Remove the redirect URL parameter so the generated code becomes a weak six-digit number.

    Seen in 1 report
  16. Send many reset requests so many valid codes exist at once because old codes are not discarded.

    Seen in 1 report
  17. Chain an internal open redirect into the reset link to send the secret code to your host.

    Seen in 1 report
  18. Inject encoded newline characters into the email field to add a BCC address.

    Seen in 1 report
  19. Rely on the admin dashboard fetching assets from the poisoned domain to leak the token.

    Seen in 1 report
  20. After the host fix, inject your own path segment into the emailed login link.

    Seen in 1 report