Skip to content
Account takeover Write-up Beginner

Account Takeover via OTP Bypass Through Response Manipulation —

The password reset flow trusted a client-side 'success' flag in the OTP verification response, so an attacker could intercept the failed response and replace it with a captured success response. This let an unauthenticated attacker reset any user's password and take over the account.

Md Tanjimul Islam Sifat Follow

Published on medium.com

https://www.dropbox.com/scl/fi/1qptjknnyr0mat4yebe4k/Account-Takeover-via-OTP-Bypass-Through-Response-Manipulation-A-Real-World-Bug-Finding.mp4?rlkey=kts3pcol6pmiq5kbypk8xx0j4&st=pxyvsugb&dl=0

Md Tanjimul Islam Sifat, 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 made the OTP verification decision in the frontend based on a response field, and the password reset endpoint did not require a server-issued proof that OTP verification had succeeded.

Impact

Any unauthenticated attacker could take over any registered user account, access personal and payment data, and place fraudulent orders, with no rate limiting required.

What the attacker needed

Victim's email address; a proxy tool such as Burp Suite; no account needed

The fix

The application should issue a signed, short-lived reset token on the server after OTP validation and require it on the password change endpoint, invalidating it after single use.

How it was found

  1. Go to the forget-password page and enter the victim's email address.
  2. Submit a random OTP and intercept the validation request in a proxy.
  3. Observe the server's failure response with success false.
  4. Capture a legitimate success response from the attacker's own account reset.
  5. Replace the victim's failed response with the captured success response.
  6. The browser shows the reset password page; set a new password and log in as the victim.

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 reset a password, the site sends a one-time code (OTP) to your email. The site's frontend checked a 'success' field in the server's reply to decide if the code was right, instead of the server enforcing it. An attacker could change that reply in their browser's proxy tool to say 'success' even when the code was wrong, then set a new password for the victim.

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 Md Tanjimul Islam Sifat

View all

3 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.