Skip to content
Account takeover Write-up Intermediate

SIMPLE IDEA IN 2FA BYPASS LEADS TO $$ & CRITICAL IMPACT !

The login flow checked only that a two-factor authentication code was valid, not that it belonged to the account being logged into. An attacker could reuse their own valid code and factor token against a victim's account to complete login.

alderson.philip Follow

Published on medium.com

ALSALAM ALIKUM first of all i’m not pro hacker i’m just sharing my experience and hope you find it useful so let’s get to it !

Philip Alderson, 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 server validated the one-time code and factor token in isolation without binding them to the account or session being authenticated.

Impact

An attacker with a valid account could bypass two-factor authentication on another account and log in as that user.

What the attacker needed

Attacker has a valid account; attacker knows victim's email; attacker can intercept own login request

How it was found

  1. Log in to your own account and intercept the request that submits the two-factor code.
  2. Note the factorAuthCode and OTP values in that request.
  3. Submit those same values in the login request for a different account.
  4. The second account is opened using the first account's code.

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 log in, a site may ask for a second proof, such as a code from an app, called two-factor authentication. This site accepted any valid code, even one from a different person's account, so someone could use their own code to get into another account.

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.