HTTP Host header attacks
What is the HTTP Host Header?
Example
GET /page HTTP/1.1
Host: example.comPurpose of the HTTP Host Header
Scenarios Where the Host Header is Critical
1. Virtual Hosting
2. Routing Traffic via Intermediaries
How the HTTP Host Header Solves Routing
HTTP Host Header Attacks
How Vulnerabilities Arise
Exploiting HTTP Host Header Vulnerabilities
Testing Steps
1. Supply an Arbitrary Host Header
2. Check for Flawed Validation
3. Send Ambiguous Requests
4. Inject Host Override Headers
Common Attack Vectors
Prevention
Avoid Using the Host Header
Validate the Host Header
Disable Host Override Headers
Whitelist Domains for Routing
Last updated