pentesting, updated

Testing for Host Header Injection

Check whether the app trusts the client-supplied Host header for links, password resets, or cache keys.

Goal

Confirm the app uses a fixed, server-configured hostname rather than trusting the request’s Host header.

How to test

Swap the Host header and see where it ends up:

curl -s https://example.com/ -H "Host: evil.com"
curl -s https://example.com/forgot-password -H "Host: evil.com" -d "email=victim@example.com"

Also try X-Forwarded-Host, which some apps trust even when Host itself is validated.

What to look for

A password-reset link built with the attacker-controlled host, a cached response keyed by an untrusted Host, or any absolute URL in the response reflecting it.

References

§ home
~/knubertus/home/
1,1 Top