Skip to content
Account takeover Write-up Intermediate

The “Oops, I Own Your Account” Password Reset Bug

The password reset page accepted the authenticity_token from the attacker's own reset request as the reset token, so an attacker could reset any user's password without access to their email. The author claims this allowed account takeover.

dineshkumar_56604 Follow

Published on medium.com

Imagine waking up one day, sipping your coffee ☕, and thinking, “Let’s see if I can reset someone else’s password without their permission!” (For ethical hacking purposes, of course). Well, that’s exactly what I did… and guess what?

Dinesh Kumar, 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

Likely the password reset endpoint accepted the request's authenticity_token (a CSRF protection value) as a valid reset token instead of only the token sent by email.

Impact

An attacker could reset any user's password without access to their email, leading to account takeover.

What the attacker needed

A free account; ability to intercept requests (e.g. Burp Suite)

How it was found

  1. Request a password reset for your own account and capture the request in Burp Suite.
  2. Note the authenticity_token value in the captured request.
  3. Open the password reset link from the email and observe it redirects to a password edit page with a token parameter.
  4. Replace the token parameter in the URL with the captured authenticity_token.
  5. Load the modified URL and reach the password reset page without the emailed link.

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 a password, a site emails you a special link with a secret code (a token) that proves you own the email address. This site also put a second secret code in the page itself, meant only to stop forged form submissions. The bug is that the site treated that second code as if it were the emailed reset code, so anyone who had their own reset page open could reset someone else'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.