Skip to content
Account takeover Write-up Beginner

How I Found a P1 Vulnerability That Allowed Full Account Takeover

The password reset code was only 4 hexadecimal characters, never expired, and had no rate limiting or CAPTCHA, with different responses for valid and invalid codes. An attacker could brute-force the code to take over any user account.

medium.com

Published on medium.com

While testing example.com for security vulnerabilities via Bugcrowd, I discovered a critical logic flaw in the password reset mechanism that allowed me to take over any user account with just a few lines of code.

hacker_space11, 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 reset code was too short, never expired, and the verification endpoint lacked rate limiting and returned distinguishable responses for valid and invalid codes.

Impact

This allowed full account takeover of any user, with access to sensitive data and potential lateral movement, and the non-expiring token made it exploitable long-term.

What the attacker needed

Victim has an account; attacker can request a reset for victim; no rate limiting on code verification

How it was found

  1. Request a password reset for the victim's email address.
  2. Receive or observe the 4-digit hexadecimal code sent to the email.
  3. Submit the code to the verification endpoint.
  4. After verification, send a follow-up request to reset the 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 code is a short secret sent to your email to prove you own the account. Here the code was very short and could be guessed by trying many combinations, and it never stopped working. That let an attacker guess the code and 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.