In-depth lesson · Host header injection
Root causes
Every point the Host header injection reports back under this heading, best-backed first, each with the reports it is seen in.
-
The reset URL is built from the client-supplied Host header instead of a fixed server-side value.
Seen in 14 reports
-
The backend accepts X-Forwarded-Host from untrusted external requests instead of only from a trusted proxy.
Seen in 7 reports
-
The host validation regex lacks an end anchor, so crafted hostnames still match.
Seen in 1 report
-
Validation only checks that the host contains a substring such as localhost rather than matching the exact domain.
Seen in 1 report
-
The cookie Domain attribute is set from the client-supplied Host header without validation.
Seen in 1 report
-
The reset code's strength depends on whether a client-supplied redirect URL is present, and old codes are never invalidated.
Seen in 1 report
-
Rate limiting and IP restrictions trust the X-Forwarded-For header without checking the request came from a trusted proxy.
Seen in 1 report
-
User-supplied email addresses are inserted into email headers without stripping newline characters.
Seen in 1 report
-
The support process treats the visible sender address of an email as proof of ownership without verifying authenticity.
Seen in 1 report
-
The forgot-password flow acts on an email address without proving the requester owns the account.
Seen in 1 report
-
Drupal's RequestContext sets a safe host then overrides it with the incoming Host header.
Seen in 1 report
-
The media upload blacklist does not include the .html extension.
-
The network allows IPv6 router advertisements and WPAD, and LDAP signing and channel binding are not enforced.
Seen in 1 report
-
The reset link is built from a user-supplied redirect parameter without checking it against an allowlist.
Seen in 1 report
-
The reset API reflects a user-supplied 'to' parameter into the link without validation.
Seen in 1 report
-
The server trusts a client-supplied host value when building the emailed login link, and after the fix still trusts a client-supplied path segment.
Seen in 1 report