Skip to content
Account takeover Write-up Intermediate

Bypassing 2FA in a Public Bug Bounty Program: A $6000 Journey

The application issued a valid JWT before OTP verification, allowing an attacker to drop the OTP request and use the token to access all API endpoints. After a fix, the payment order endpoint remained accessible without OTP verification, enabling unauthorised payment actions.

mokhansec Follow

Published on mokhansec.medium.com

As a bug bounty hunter, uncovering vulnerabilities in public programs is both thrilling and rewarding. In this post, I’ll walk you through how I discovered and exploited a 2FA bypass vulnerability in a public bug bounty program (anonymized as redacted.com for confidentiality), earning a total of $6000.

Mohsin khan, on mokhansec.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 authentication token was issued before the second factor was verified, and authorisation checks were not enforced on every endpoint.

Impact

An attacker could bypass 2FA and access all API endpoints, and after the fix, still access the payment order endpoint without OTP verification, potentially performing unauthorised payment actions.

What the attacker needed

Valid user credentials; ability to intercept HTTP requests

The fix

The company fixed the initial issue and later addressed the payment endpoint oversight, but the text does not detail the fix method.

How it was found

  1. Log in with valid credentials and reach the OTP prompt.
  2. Intercept the OTP verification request in Burp Suite.
  3. Drop the OTP request instead of forwarding it.
  4. Use the JWT from the dropped request to access API endpoints.
  5. After the fix, navigate directly to the payment order page without completing 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.

Two-factor authentication (2FA) adds a second step, like a one-time code, after your password. Here, the site gave a working login token before that second step was checked, so skipping the code still let the attacker in. Later, one payment page also skipped the 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.

More by mokhansec

View all

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