Skip to content
Account takeover Write-up Intermediate

I Followed the Password Reset Flow — and Ended Up Resetting Everyone’s Password

The password reset endpoint accepted a valid reset token for any email address, and the reset response containing the token was cached and served to other users. An attacker could reset any user's password without interaction.

infosecwriteups.com

Published on infosecwriteups.com

Free Link🎈

Iski, on infosecwriteups.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 reset token was not bound to the user's email and was not invalidated after use, and the reset response was cached without user-specific keys.

Impact

An attacker could reset any user's password at scale without user interaction, leading to full account takeover.

What the attacker needed

A valid reset token; ability to send HTTP requests

The fix

The reset token should be bound to the user's email, invalidated after use, and the reset response should not be cached.

How it was found

  1. Submit email to start password reset
  2. Receive reset token
  3. Validate token
  4. Set new password
  5. Reuse the same token in a different browser or after reset
  6. Change the email parameter while keeping the same token

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 link usually contains a secret code (token) that proves you own the email. Here, the server did not check that the token belonged to the email being reset, so one token worked for every account. Also, the server saved (cached) the response containing the token and gave it to other people, letting them take over accounts.

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.

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.