Skip to content
Account takeover Write-up Beginner

Day 20: Admin Account Takeover via Weird Password Reset Functionality

The password reset endpoint accepted a new password without validating the reset token or confirming that the requester owned the email address. An attacker could reset any account's password, including an administrator's, by submitting the victim's email in the request body.

danielbelay Follow

Published on medium.com

Today’s write-up by Mahmoud Youssef describes a flawed password reset implementation that led to a full admin account takeover.

dani3l, 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

The password reset endpoint trusted the email address supplied in the request body and did not verify the reset token or the ownership of that email.

Impact

An attacker could reset the password of any account, including an administrator account, leading to full account takeover.

What the attacker needed

Knowledge of victim's email address; no token validation on reset endpoint

The fix

The password reset endpoint should validate the reset token and confirm that the requester owns the email address before accepting a new password.

How it was found

  1. Request a password reset link for the attacker's own email and for the victim's email.
  2. Ignore the verification step at the unique hash URL because it is not used for validation.
  3. Submit a password reset request directly, replacing the attacker's email with the victim's email in the request body.
  4. Log in with the victim's email and the new password to confirm the account takeover.

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 usually emails you a special link that proves you own the account. This site skipped checking that proof at the final step, so anyone could type a victim's email address and set a new password for them. That let the researcher take over an admin 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.

More by danielbelay

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.