Day 17: [$5K] Misconfigured Reset Password Leads to Account Tak
A password reset API returned the reset token in its response for any valid username, so an attacker could obtain the token and reset that user's password. This allowed takeover of any account, including admins, without victim interaction.
Hello folks! I hope you’re all staying safe and healthy.
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 password reset endpoint returned the generated reset token in its JSON response instead of only sending it to the account owner by email.
Impact
An attacker could reset the password of any valid user, including admins, without any interaction from the victim, potentially enabling financial fraud.
What the attacker needed
Knowledge of a valid username; no victim interaction
How it was found
- Test the login, signup and password reset features.
- Notice the forgot password flow uses AJAX and inspect the XHR responses.
- Find the reset token endpoint in the page source.
- Intercept the password reset request and observe the token in the response for a username.
- Build a password reset link using the username and leaked token.
- Reset the target user's password and take over the account.
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 site usually emails you a secret link to set a new one. Here, the site also sent that secret back in the response to the web request itself, so anyone who knew a username could ask for it and get the key to that account. That let an attacker change the password and lock the real owner out.
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.