Skip to content
Account takeover Write-up Beginner

Part 4: Exploiting Broken Auth — How I Got In Without a Pas

The password reset flow allowed OTP brute forcing because the v3 endpoint rate-limited after about 10 attempts, but the older v2 endpoint had no such limit. An attacker could brute force the OTP and reset any user's password, leading to account takeover.

TraceX0 Follow

Published on medium.com

🧠 Part 4 of the crAPI Hacking Series I’m Mihir— aka TraceX0. I break APIs, exploit web apps, play CTFs, and hunt bugs for fun.

TraceX0, 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 older API version (v2) lacked the rate limiting present in v3, allowing unlimited OTP guesses.

Impact

An attacker could take over any user account by brute forcing the OTP through the unprotected v2 endpoint.

What the attacker needed

Knowledge of a victim's email address; ability to send many requests (e.g., Burp Intruder)

How it was found

  1. Go to the login page and click 'Forgot Password'.
  2. Provide the email address of an existing user.
  3. Capture the OTP validation request in Burp Suite.
  4. Brute force the 4-digit OTP using Intruder; after about 10 attempts the v3 endpoint returns errors.
  5. Change the endpoint from v3 to v2 and continue brute forcing without rate limiting.
  6. Once the OTP is verified, log in with the new password set during the reset.

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 site sends a one-time code (OTP) to your email or phone. If the site lets someone guess that code over and over without stopping them, the attacker can reset your password and take over your account. Here, an older version of the API did not have the guessing protection that the newer version had.

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 TraceX0

View all

1 more disclosed report, 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.