Skip to content
Account takeover Write-up Intermediate

A Tale Of Two Simple Account Takeover

The password reset token contained the user's email encoded in a reversible way, allowing an attacker to craft a token for any email and take over accounts. A separate admin page allowed changing another user's password via IDOR, enabling account takeover.

Dipak kumar Das Follow

Published on addictivehackers.blogspot.com

The original lives on addictivehackers.blogspot.com

We do not hold its text, 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 was predictable (email encoded with spaces) and the admin profile edit lacked proper authorization checks.

Impact

An attacker could take over any user account by crafting a password reset link or by using the IDOR to change another user's password.

What the attacker needed

Access to the password reset function; knowledge of victim's email; access to the admin user page

The fix

The password reset token should be a random, unpredictable value, and the admin profile edit should verify that the user is authorised to change the target account.

How it was found

  1. Initiate a password reset and observe the reset link containing an id parameter.
  2. Decode the id parameter to reveal the user's email with spaces between characters.
  3. Modify the encoded email to another user's email and use the link to reset their password.
  4. Access the admin user page and edit your own profile.
  5. Capture the request and change the email parameter to a victim's email and set a new password.
  6. Log in to the victim's account with the new 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.

A password reset link should be a random secret that only the server can verify. Here, the link contained the user's email address in a simple encoded form, so anyone could change the email in the link to target another person. Also, an admin page let a user change another user's password by changing a hidden field, which is like editing a form to act as someone else.

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 Dipak kumar Das

View all

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