Skip to content
Account takeover Write-up Beginner

2FA Bypass via Response manipulation

The application's OTP verification endpoint returned a JSON boolean indicating validity, and the client-side flow trusted this response to grant access. An attacker could intercept the server response and change the boolean from false to true, bypassing the second factor and reaching the dashboard.

medium.com

Published on medium.com

My name is Omid, and I have been an active bug bounty hunter for about a year now. Throughout this journey, I’ve acquired valuable knowledge and uncovered some fascinating vulnerabilities.

0mex, 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 flow trusted a boolean in the server response to decide whether OTP verification succeeded, instead of the server enforcing the check and issuing a session only after a valid OTP.

Impact

An attacker with valid credentials could bypass the second factor and access the account dashboard, completely invalidating the 2FA mechanism.

What the attacker needed

Valid username and password; ability to intercept and modify responses

How it was found

  1. Log in with username and password and get redirected to the OTP page.
  2. Enter an incorrect OTP and observe the JSON response with valid set to false.
  3. Intercept the response in Burp Suite and change valid from false to true.
  4. Forward the modified response and get redirected to the dashboard.

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.

Two-factor authentication (2FA) adds a second step, like a one-time code sent to your email, after your password. Here, the website's front end decided whether to let you in based only on a true/false value in the server's reply. By changing that value from false to true, the attacker skipped the code check entirely.

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.