Skip to content
Account takeover Write-up Beginner

Account Takeover Through Changing Id In Reset Password

The password reset flow used a predictable user identifier that could be changed to another user's ID, allowing an attacker to reset that user's password. An attacker could take over any account by guessing or incrementing the ID.

Jody ritonga Follow

Published on systemweakness.com

Hello everyone! I hope all of you who are reading this are in good health and having a wonderful day!

Jody ritonga, on systemweakness.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 trusted a client-supplied user identifier without verifying it belonged to the requesting user, and the identifiers were sequential and predictable.

Impact

An attacker could reset the password of any user whose ID they could guess, leading to account takeover.

What the attacker needed

Ability to intercept and modify requests; two accounts to test

The fix

The reset password endpoint should verify that the user identifier in the request matches the authenticated user or the reset token's owner, and identifiers should not be predictable.

How it was found

  1. Create two accounts, user A and user B, and note their user IDs.
  2. Request a password reset for user A and intercept the request.
  3. Change the user_id parameter to user B's ID and forward the request.
  4. Set a new password for user B and confirm the reset succeeded.

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 often sends a link that includes a number identifying your account. If that number is easy to guess and the site does not check that the link belongs to you, someone else can change the number to point at your account and set a new password. This lets them log in as 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 Jody ritonga

View all

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