Skip to content
Account takeover Write-up Beginner

OTP Bypass Bug in Public Bug Bounty Program

The OTP verification logic relied on client-side checks, so an attacker could intercept the server response and change the status code, message, and verification flags to make an unverified account appear verified. This allowed bypassing mobile number authentication during registration and login.

medium.com

Published on medium.com

Friend Link | Free Link

It4chis3c, 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 application performed OTP verification checks on the client side and trusted editable response fields, rather than validating the OTP and setting verification status on the server.

Impact

An attacker could register and log in without a valid phone number or OTP, bypassing mobile authentication.

What the attacker needed

Ability to intercept and modify responses (e.g., Burp Suite); a valid email address for registration

The fix

OTP verification and setting of verification flags should be performed and enforced on the server side, not trusted from client-editable responses.

How it was found

  1. Go to the sign-up page and fill the form with valid details except the mobile number.
  2. Submit the form; it prompts for OTP verification.
  3. Enter a wrong OTP and intercept the request in Burp Suite.
  4. Configure Burp to intercept the response to that request and forward it.
  5. In the response JSON, change the status code from 401 to 200, the message from Invalid to Valid, and set phoneVerified and emailVerified from 0 to 1.
  6. Forward the modified response; the user gets registered.

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 sign up, the server sends a response saying whether your one-time code (OTP) was correct. Here, the app trusted that response on the user's side instead of checking on the server, so someone could edit the response to say 'valid' and skip phone verification.

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.