I Removed One Parameter… and Took Over Another User’s Account ($3000 — $10,000)
The password reset API did not require the verification code, so an attacker could change any user's password by supplying only their email and user ID. Because another API exposed those identifiers, an attacker could take over any account.
Published on medium.com
Password reset functionality is one of the most security-critical features of any web application. Even if the authentication mechanism is implemented correctly, a flaw in the password reset workflow can allow attackers to completely compromise user accounts.
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
The backend did not enforce the verification code and trusted client-supplied email and userId to decide which account to update.
Impact
An attacker could reset any user's password and take over their account, with potential privilege escalation if privileged accounts are targeted.
What the attacker needed
Victim's email address and user ID known; another API exposes those identifiers; no verification code required
The fix
The issue was fixed by enforcing server-side validation of the verification code, rejecting requests when it is missing, invalid or expired, and binding codes to the intended account.
How it was found
- Intercept the password reset request and note the verificationCode, email and userId parameters.
- Try changing email and userId while keeping the original verificationCode; the request fails because the code is bound to the original account.
- Remove the verificationCode parameter entirely and send the request; the password is still updated.
- Log in with the new password to confirm the change.
- Replace email and userId with another user's values and send the request again; the server updates that user's password.
- Log in to the victim's account with the new password, confirming account takeover.
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 password reset normally asks for a code sent to your email to prove you own the account. Here the server skipped that check, so anyone who knew your email and user ID could set a new password and log in as you. Another part of the site also leaked those IDs, making the attack easy.
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.