Skip to content
Account takeover Write-up Intermediate

Token Of My Affection How Reset Links Let Me Hijack Any Account

The password reset endpoint returned the reset token in the response body, and the token was not bound to a user, so it could be reused to reset any account's password. An attacker could obtain a token and use it to take over other users' accounts, including admin accounts.

iski Follow

Published on infosecwriteups.com

Free Link 🎈

Iski, on infosecwriteups.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 reset token was not tied to a specific user and was exposed in the API response, allowing reuse across accounts.

Impact

An attacker could reset any user's password, including admin accounts, leading to full account takeover.

What the attacker needed

Ability to trigger password reset; obtain a reset token

The fix

The text recommends invalidating tokens after use, not exposing them in responses, binding tokens to the user, and adding rate limiting.

How it was found

  1. Trigger a password reset request and observe the response containing a reset token.
  2. Use the token from one account to reset the password of another account.
  3. Log in to the victim 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.

When you forget your password, a website sends you a special link with a secret code (token) to prove it's you. Here, the website gave out that secret code to anyone who asked, and the code worked for any account, not just yours. So an attacker could get a code and use it to change someone else's password and take over their 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 iski

View all

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