Skip to content
Account takeover Write-up Beginner

Account Takeover [It Looked Secure at First]

The password reset request used a user ID instead of the reset token, allowing an attacker to change any user's password by supplying a valid ID. Additionally, user enumeration and unauthenticated role updates enabled privilege escalation to admin.

Cristi Vlad Follow

Published on cristivlad.medium.com

In a recent pentest for a client, I was going through the password reset flow. You know:

Cristi Vlad, on cristivlad.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 trusted a client-supplied user ID rather than validating the secret token, and access controls were missing on user listing and role updates.

What the attacker needed

A valid user ID; ability to intercept requests

The fix

The reset token should be time-sensitive, bound to the user, and actually used in the password reset request instead of the user ID; access controls should also be enforced server-side.

How it was found

  1. Request a password reset and receive the email with a reset link.
  2. Open the reset link and fill in the new password fields.
  3. Intercept the password reset request and observe the id parameter.
  4. Replace the id with another user's ID to reset their 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 your password, a website sends a special link with a secret code. This site's reset form sent the user's ID number instead of that secret code, so anyone who guessed or found an ID could reset that person's password. The site also let low-level users list all users and even change roles without logging in.

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 Cristi Vlad

View all

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