How a Forgot-Password “Feature” Let Me Impersonate Any Execut
The password recovery endpoint built the reset link using the client-supplied X-Forwarded-Host header, so an attacker could point the link at their own server. Because the system also rendered the email in an internal admin dashboard that automatically fetched assets from the poisoned domain, the reset token leaked without the victim clicking anything, allowing account takeover.
If you talk to any senior pentester, they’ll tell you that authentication mechanisms are like onion layers: developers focus 90% of their energy on the front door (the login screen) and almost zero energy on the side window (the recovery flow).
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
An unauthenticated attacker could take over any enterprise user account on the platform, including the CEO's, without any interaction from the victim.
What the attacker needed
Knowledge of victim's email address; attacker-controlled server to receive requests; no victim interaction required
How it was found
- Send a password recovery request for a test account and intercept it.
- Modify the X-Forwarded-Host header to point to an attacker-controlled server and resend.
- Observe that the reset email contains a link to the attacker's server.
- Send a recovery request for the victim's email with the same poisoned header.
- The internal admin dashboard renders the email in an iframe and automatically fetches assets from the attacker's server, leaking the token.
- Use the leaked token 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 website emails you a special link with a secret code. This site built that link using a value the attacker could control, so the link pointed to the attacker's server. The site also showed a copy of the email inside an admin page that automatically loaded things from that link, so the secret code went straight 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.