Routing-Based SSRF — Host Header Injection Leads to Internal Access
The backend used the Host header to decide where to route requests, so changing it to an internal address made the server send the request to an internal-only admin panel. An attacker could then reach restricted admin interfaces and sensitive internal services that trust internal traffic.
infosecwriteups.com
Published on infosecwriteups.com
This vulnerability demonstrates a Server-Side Request Forgery (SSRF) attack vector, where Host header manipulation is exploited to bypass internal routing controls.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the reverse proxy or load balancer routed requests based on the untrusted Host header without validating it against an allowlist, letting it point at internal hosts.
Impact
An attacker could reach restricted admin interfaces and sensitive internal dashboards or APIs, and potentially pivot into deeper internal systems.
What the attacker needed
A lab environment; Burp Suite with Collaborator; ability to send crafted requests
The fix
The server should not route on the client-supplied Host header; it should validate it against a fixed allowlist of expected hosts.
How it was found
- Open the lab and read its description.
- Find a homepage request in Burp's HTTP history and send it to Repeater.
- Change the Host header to a Collaborator subdomain and check for an incoming request.
- Use Burp Intruder to brute force internal IP addresses and watch for responses that differ.
- Send the request with the working internal IP to the admin deletion endpoint.
- Confirm the lab reports it as solved.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web server sometimes uses the address in the Host header, which normally names the site you asked for, to decide where to send the request. If it trusts that value, an outsider can put an internal address there and make the server fetch something only insiders should reach. This is called server-side request forgery, because the server is tricked into making the request for the attacker.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.