Skip to content
Account takeover Write-up Beginner

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.

dani3l Follow

Published on medium.com

Hello folks! I hope you’re all staying safe and healthy.

dani3l, on medium.com

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

  1. Test the login, signup and password reset features.
  2. Notice the forgot password flow uses AJAX and inspect the XHR responses.
  3. Find the reset token endpoint in the page source.
  4. Intercept the password reset request and observe the token in the response for a username.
  5. Build a password reset link using the username and leaked token.
  6. 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.

More by dani3l

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.