Skip to content
Account takeover Write-up Intermediate

Account takeover through password reset

The password reset endpoint returned the reset token in the response when a reset was requested, and the same token was accepted when submitting a new password. An attacker who knew a victim's email address could obtain the victim's token and use it to set a new password, taking over the account.

Omar Hamdy Follow

Published on medium.com

Bounty$2,000 View original

#### Omar Hamdy

Omar Hamdy, 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 request response disclosed the reset token, and the password change endpoint trusted that token without binding it to the requester's own session or account.

Impact

An attacker could take over any account whose email address they knew, though the company initially rated it lower because it believed the victim's full name was also required.

What the attacker needed

Know the victim's email address; intercept HTTP requests (proxy)

How it was found

  1. Request a password reset for the victim's account and intercept the request.
  2. Read the victim's reset token from the response.
  3. Request a reset for your own account, open the emailed link, change your password and intercept that request.
  4. Replace your token with the victim's token and submit, which changes 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 site emails you a secret link containing a token, a long random code that proves you own the account. Here the site also handed that secret code back in the response to the reset request itself, so anyone who knew your email address could grab it and set a new password for you.

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 Omar Hamdy

View all

2 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.