How I Took Over Any Account in 200 Seconds Using the Password Reset Flow Itself
The password reset endpoint returned the reset token in the API response body, allowing an unauthenticated attacker who knows a victim's email address to obtain the token and reset the victim's password, leading to full account takeover.
Published on medium.com
I was testing a B2B invoicing platform during a bug bounty session. Nothing flashy.
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 a debug feature that returned the reset token in the API response was left enabled in production.
Impact
Any unauthenticated attacker who knows a target's email address can take over their account silently, gaining access to client financial records, saved payment methods, and business workflows.
What the attacker needed
Knowledge of victim's email address; no authentication required
The fix
The password reset endpoint should never return the token in the HTTP response; it should only be sent via email, and the response should be generic to avoid email enumeration.
How it was found
- Send a password reset request for a victim's email address.
- Observe the reset token in the API response body.
- Use the token to reset the victim's password.
- Log in as the victim with the new 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 your password, a website usually sends a secret link to your email to prove you own the account. Here, the website also put that secret link in the response it sent back to the browser, so anyone who asked for a reset for someone else's email could see the secret and use it to change that person's password.
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.