Skip to content
Account takeover Write-up Beginner

OTP Bypass Menuju Account Takeover via Response Manipulation

The registration OTP check was enforced only in the client, so the server accepted a manipulated success response even when a wrong OTP was submitted. An attacker could register and verify an account without knowing the real OTP, leading to account takeover.

nervhym Follow

Published on nervhym.medium.com

Halo semua! Hari ini adalah hari yang sangat spesial bagi saya.

NERVHYM, on nervhym.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 server did not validate the OTP itself and instead relied on the client-side response to decide whether verification succeeded.

Impact

An attacker could verify an account without the real OTP, which the report frames as a pre-account takeover; the author notes some companies treat this class as out of scope, but this financial-services target accepted it.

What the attacker needed

Ability to intercept and edit HTTP responses; a saved success response from a normal signup

How it was found

  1. Create an account normally and save the JSON success response from the email verification.
  2. Create a new account and enter a random, incorrect OTP at the verification step.
  3. Turn on Burp Suite Intercept before sending the OTP request.
  4. Forward the OTP request and choose to intercept its response.
  5. Replace the error JSON response with the saved success JSON response and forward it.
  6. The account is registered and usable despite the wrong OTP.

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 app asks for a one-time code (OTP) sent to your email or phone. Here the app trusted the reply that the browser showed rather than checking the code on the server, so a person could swap the 'wrong code' reply for a 'correct code' reply and get in. This is like a bouncer who believes a fake stamp on your hand instead of checking the guest list.

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 nervhym

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.