Skip to content
Account takeover Write-up Intermediate

2FA Bypass Do Re Mi

The application's two-factor authentication check could be bypassed by manipulating three request parameters (mtoken, mtoken_secret, mtoken_t). An attacker who knows a valid username and password could set mtoken to 0, keep the server-provided mtoken_secret, and set mtoken_t to an empty string, causing the server to return an authenticated session token without a valid second factor.

Ashlyn Lau Follow

Published on medium.com

Not all 2FA bypass techniques are made equal, the most common scenario I came across are either one of the following:

Ashlyn L, 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 did not properly validate the second-factor token, relying on client-supplied parameters that could be manipulated to bypass the check.

What the attacker needed

Valid username and password; ability to intercept and modify requests

How it was found

  1. Submit a valid user id and password to reach the 2FA prompt.
  2. Enter a random M-token value and observe the 2FA rejection.
  3. Manipulate the three parameters mtoken, mtoken_secret, and mtoken_t, starting with empty or false values.
  4. Set mtoken to 0, keep mtoken_secret from the first login response, and set mtoken_t to an empty string.
  5. Submit the modified request and receive an authenticated session token.

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) is a second check, like a code from your phone, after your password. Here, the server checked the code incorrectly: by changing three hidden values sent with the login request, the attacker made the server think the code was correct. This let them log in with just a password, skipping the second step.

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 Ashlyn Lau

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.