Skip to content
Account takeover Write-up Intermediate

Breaking OTPs in the Real World: How Design Flaws Led to Full Account Takeover

The write-up describes four cases where weak OTP or magic-link designs allowed brute-force or reuse attacks, leading to account takeover. In one case, a 4-digit OTP with a server-side 10-minute window and a flawed lockout allowed brute-forcing; in another, a resend request exposed the OTP.

Arioex Follow

Published on medium.com

In this write-up, I’m excited to share how I approach OTP (one-time password) implementations, the mindset I use, the questions I always ask myself, and how that helped me uncover multiple real-world vulnerabilities that led to paid bug bounty rewards.

Huntsman, 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 implementations lacked proper server-side rate limiting, had longer-than-expected validity windows, or exposed the OTP in requests, allowing brute-force or reuse.

Impact

In the first two cases, attackers could brute-force the OTP and fully take over accounts; in the third, a logical flaw allowed immediate account takeover; in the fourth, the risk was recognised but not fully exploited due to complexity.

What the attacker needed

Access to the OTP verification endpoint; ability to send many requests; a test account

How it was found

  1. Divide the 6-digit OTP range into chunks and brute-force from multiple servers.
  2. Send 200 OTP attempts per minute to avoid lockout, repeating over 10 minutes.
  3. Intercept the resend OTP request and observe the OTP in a parameter.
  4. Enter the observed OTP to log in.
  5. Generate multiple magic links and note they remain valid for over 24 hours.

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 one-time password (OTP) is a short code sent to your phone or email to prove it's you. If the system doesn't limit how many times someone can guess, or if the code stays valid too long, an attacker can try many codes until they get in. This write-up shows several such mistakes that let attackers take over accounts.

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 Arioex

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.