How I Found Account take over via (“Host header injection Bypas
The password reset feature built the reset link from the X-Forwarded-Host header instead of the real host. An attacker could make the victim's reset email point to the attacker's server and capture the reset token to take over the account.
Gua nemu celah di fitur “Forgot Password” target Intinya gua bisa nipu server biar dia ngirim link reset password ke domain punya gua sendiri bukan ke domain asli mereka Hasilnya Gua bisa dapet token buat ganti password user lain
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 application trusted the client-supplied X-Forwarded-Host header when generating the password reset URL instead of using a fixed, configured hostname.
Impact
An attacker who knows a victim's email could take over their account without knowing the old password, provided the victim clicks the poisoned reset link.
What the attacker needed
Attacker knows victim's email; victim clicks the reset link; attacker controls a server
How it was found
- Intercept the forgot password request with Burp Suite.
- Add or modify the X-Forwarded-Host header to point to an attacker-controlled server.
- Observe that the server builds the reset link using the header value.
- The victim receives an official email whose reset button points to the attacker's server.
- The token is logged on the attacker's server when the victim clicks the link.
- Use the captured token on the real site to reset the victim's password.
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 forget a password, a site emails you a special link with a secret code (a token) that lets you set a new one. This site trusted a header called X-Forwarded-Host, which is just extra information sent with the request, to decide the domain in that link. By putting their own domain there, the attacker made the email link point to their server, so when the victim clicked it the secret code was sent to the attacker.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.