Finding Host Header Injection
The password reset email on a cloud gaming site built its reset link from the request's Host header, so a manipulated header made the link point to an attacker-chosen domain. An attacker could send a victim a reset link that leads to a site they control, potentially capturing the reset token.
Published on systemweakness.com
Hello everyone! This is Jody Ritonga, back again with another bug bounty writeup!
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
Impact
The reset link in the email could be pointed at an attacker-controlled domain, which may let an attacker capture the reset token and take over the account.
What the attacker needed
Ability to intercept and modify requests; victim clicks the emailed reset link
The fix
The application should validate the Host and forwarded-host headers against an allowlist and build reset links from a fixed, trusted base URL.
How it was found
- Intercept the forgot-password request in Burp Suite.
- Change the Host header to an attacker domain; this alone did not work.
- Add an X-Forwarded-Host header set to the real domain while keeping the Host as an external site.
- Trigger the reset email and click the link, which led to the external site.
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.
When you ask a website to reset your password, it emails you a link. The site builds that link from the address you typed in your browser, called the Host header. If the site trusts whatever address is supplied, an attacker can make the emailed link point to their own site instead, so the victim's reset token could be stolen.
What is Smuggling / CRLF?
A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.