Skip to content
Account takeover Write-up Intermediate

Exploiting the Gaps in Password Reset Verification

A password reset token verification endpoint returned different responses for valid and invalid tokens, and leaked the user's first name for valid tokens. Without rate limiting, an attacker could brute-force tokens and confirm a valid one, potentially leading to account takeover.

medium.com

Published on medium.com

Free Article Link: Click for free!

Ehtesham Ul Haq, 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 token verification endpoint returned distinguishable responses for valid versus invalid tokens and lacked rate limiting, allowing token enumeration.

Impact

An attacker could confirm valid password reset tokens and potentially take over accounts, and the first name leak could aid phishing; the lack of rate limiting makes the attack scalable.

What the attacker needed

Access to a valid reset token or ability to guess; no rate limiting on the endpoint

The fix

The endpoint should be fixed by adding rate limiting, avoiding leaking user information, using generic error messages, and expiring tokens quickly and making them single-use.

How it was found

  1. Initiate a password reset for a test account.
  2. Extract the token from the reset email link.
  3. Intercept the request to the token verification endpoint.
  4. Send the request to Burp Intruder with a list of possible tokens including the valid one.
  5. Run the attack and observe that the valid token returns a different response containing the first name.

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 website emails you a special link with a secret code (token) to reset it. This report found that the website had a page that would tell you if a code was correct or not, and even show the user's first name if it was. Because there was no limit on how many times you could try, someone could guess codes over and over until they found a working one and then take over the account.

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.