Skip to content
Account takeover Write-up Beginner

Easy Account Takeover Using OTP Bypass

The application relied on the client to decide whether an OTP check succeeded, so an attacker could intercept the failed verification response and change it to a success. The text claims this granted full access to the victim's account without a valid OTP.

dharineeshj2 Follow

Published on medium.com

OTP (One-Time Password) bypass refers to methods attackers use to circumvent OTP-based authentication and gain unauthorized access to user accounts. Some common techniques include:

Hack-Bat, 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 client-side application trusted the server's response body to decide whether the OTP was valid, instead of the server enforcing the result and issuing a session only after a correct code.

Impact

The text claims this could lead to full account takeover of any user whose phone number is known, though it gives no independent confirmation beyond the author's own testing.

What the attacker needed

Victim's phone number; ability to intercept traffic (proxy); client trusts response body

The fix

OTP verification should be enforced entirely on the server, with a session token issued only after a correct code, and responses should be integrity-protected.

How it was found

  1. Enter the victim's phone number on the login page and request an OTP.
  2. Submit a deliberately wrong OTP and capture the request with an intercepting proxy.
  3. Intercept the server's failure response.
  4. Change the response body to show success.
  5. Forward the modified response to the client, which then grants access.

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 to prove it is you. Here the website asked the server to check the code, but then trusted the reply it got back on the user's own device. By editing that reply to say 'success', the attacker could get in without knowing the real code.

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 dharineeshj2

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.