Learn how to abuse the HTTP Host header to bypass authentication, poison password resets, and manipulate URLs.
The HTTP Host header specifies which website/domain the client is requesting. All HTTP requests must include it:
The Host header is used by servers to:
Host headers are user-controlled. Unlike the TCP connection origin, attackers can forge any Host value. Many applications blindly trust the Host header to generate URLs, leading to vulnerabilities.
Attacker runs:
The app generates reset link: https://attacker.com/reset?token=xyz (points to attacker's domain!)
Attacker requests password reset with malicious Host header:
Inject malicious Host value into cached response:
Applications use Host header to build URLs in responses:
Some apps reveal internal infrastructure via Host header validation errors:
GitHub (2014): Host header poisoning allowed attackers to inject malicious code into password reset emails
LinkedIn: Cache poisoning via Host header reflected in HTTP headers (leaked via shared caches)
Shopify: Password reset poisoning in merchant dashboard (bounty awardee: Ali Yazdani)
Lab 00 - Password Reset Poisoning: Forge Host header to inject malicious reset link
Lab 10 - Weak Validation Bypass: Exploit substring-based Host validation to bypass security check