Skip to content
Account takeover Write-up Beginner

Account takeover through password reset functionality

The password reset endpoint accepted separate email and username parameters, allowing an attacker to supply their own email while targeting a victim's username. This caused the reset link to be sent to the attacker's email, enabling account takeover.

rewscel Follow

Published on rewscel.medium.com

Typically when approaching targets I will always navigate the site as if I were a “normal user”, doing this allowed me to find an interesting endpoint that allowed a user to reset a password by providing the email.

rewscel, on rewscel.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

Impact

An attacker could take over any account as long as they know the email address associated with it.

What the attacker needed

Knowledge of victim's email; attacker-controlled email address

The fix

The password reset endpoint should derive the recipient email from the username rather than accepting a separate email parameter.

How it was found

  1. Find the password reset endpoint that takes an email parameter.
  2. Intercept the reset request and note the separate Email and Username parameters.
  3. Change the Email parameter to an attacker-controlled address while keeping the victim's Username.
  4. Send the request and observe the success response indicating a link was sent.
  5. Check the attacker's email for the reset link.
  6. Use the link to set a new password for the victim's account.

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 reset link to your email. Here, the website let the person requesting the reset choose which email to send the link to, separately from the account name. So an attacker could ask for a reset for someone else's account but have the link sent to their own email, then use it to change the victim's password.

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.