Skip to content
Account takeover Write-up Beginner

My First Bug Bounty: A Simple OTP Flaw That Led to Account Takeover

The OTP verification endpoint allowed unlimited guesses of a 6-digit code valid for 30 minutes, with no rate limiting or lockout. An attacker could brute-force the OTP to take over any user's account.

montaser_mohsen Follow

Published on medium.com

I am montaser mohsen a security researcher and bug bounty hunter with a strong interest in web application security, especially authentication and session management flaws.

montaser mohsen, 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 OTP verification endpoint lacked any rate limiting, attempt cap, or lockout, allowing unlimited guesses within the 30-minute validity window.

Impact

An attacker could brute-force the OTP within the valid time window to fully take over any user's account, including changing the victim's email address and accessing sensitive data or team features.

What the attacker needed

Victim's email address known; no user interaction required

The fix

The report recommended implementing rate limiting, reducing OTP validity, applying IP- and user-based throttling, introducing temporary lockout, and tracking failed attempts; the text does not state whether these were implemented.

How it was found

  1. Go to the login or signup page.
  2. Enter any email address.
  3. The application sends a 6-digit OTP to that email.
  4. Enter any random OTP and intercept the Verify OTP request.
  5. Send the request to Burp Intruder and configure it to iterate through possible OTP values.
  6. Start the attack and observe that unlimited attempts are allowed with no rate limiting or lockout.

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 log in with just an email, the site sends a short numeric code (a one-time password, or OTP) to prove you own that email. This site let someone try as many codes as they wanted for half an hour, so a computer could simply guess until it found the right one and then get into the 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 montaser_mohsen

View all

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