Skip to content
Account takeover Write-up Beginner

How I Exploited an OTP Vulnerability & Reported It! $$$

The OTP verification endpoint lacked rate limiting, allowing an attacker to brute-force the six-digit code. Additionally, the server accepted any OTP that had previously returned a 200 OK response, enabling account takeover.

medium.com

Published on medium.com

I was hunting on a VDP (Vulnerability Disclosure Program) when I found a critical OTP vulnerability that could allow an attacker to take over any account! Here’s the full story! 👇

Shrujal Mandawkar, 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

Impact

An attacker could take over any account by brute-forcing the OTP and then using a previously accepted wrong OTP to bypass authentication.

What the attacker needed

A free account; victim's username or email; ability to intercept requests

The fix

The issue was fixed by adding rate limiting, correcting OTP validation logic, implementing account lockout, and adding monitoring.

How it was found

  1. Sign up on the website and receive a 6-digit OTP.
  2. Enter a wrong OTP (e.g., 000000) and capture the request in Burp Suite.
  3. Send the request to Intruder and set up a brute-force attack cycling through numbers.
  4. Observe that the server responds with 200 OK for the correct OTP.
  5. Use any wrong OTP that also gave a 200 OK response to bypass authentication.
  6. Enter a new password to take over the account.

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 a one-time password (OTP), the server should limit how many guesses you can make. Here, it did not, so someone could try many codes until one worked. Also, the server remembered which wrong codes had been tried and then accepted them later, which is a serious mistake.

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.