Simulations/Host Header Injection

Host Header Injection

Intermediate

The password-reset flow builds the reset link from the incoming Host header: "https://" + host + "/reset?token=…". Control the Host (or a trusted X-Forwarded-Host) and the emailed link points wherever you like — leaking the victim's reset token to your domain.

Progress:
1
Poison via the Host header
2
Bypass with X-Forwarded-Host
3
Pin the canonical host
⚡ Password reset request
POST /password-reset
🛡 Server Protection
Server response log
Waiting for request…

Challenges

1
Poison via the Host header
Set the Host header to evil.attacker.com and see the reset link point at the attacker.
hints
2
Bypass with X-Forwarded-Host
Leave Host legit but set X-Forwarded-Host to an attacker domain; the app trusts the proxy header.
hints
3
Pin the canonical host
Enable the trusted-canonical-host fix and confirm the link always points at account.example.com even with a spoofed header.
hints
How to fix Host Header Injection
canonical base URLs, Host allowlists, framework trusted-host config

Frequently Asked Questions