Skip to content
Account takeover Write-up Beginner

Web Security Series #2 — Bypassing Authentication via MFA Tampe

The server did not bind the MFA code to the user who requested it, so an attacker could intercept the MFA submission request and change the username to another account while keeping the same valid MFA code. This allowed authentication as the other user.

Laibakashif Follow

Published on medium.com

Multi-Factor Authentication (MFA) is widely used to strengthen authentication mechanisms by requiring users to verify their identity using more than one factor. Typically, after entering a username and password, a user must provide a one-time verification code generated through a device or authentication system.

Laibakashif, 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 MFA code in isolation without binding it to the user or session that originally requested it.

Impact

An attacker with valid credentials and an MFA code for one account could authenticate as another user, leading to unauthorised account access and potential privilege escalation.

What the attacker needed

Valid credentials for one account; a valid MFA code for that account; ability to intercept and modify HTTP requests

The fix

The server should bind each MFA token to the specific user and session that requested it, validate that the code belongs to the correct username, and expire tokens after a single use.

How it was found

  1. Log in with the provided credentials for one user and reach the MFA prompt.
  2. Enable Burp Suite interception and submit the MFA code to capture the request.
  3. In the intercepted request, change the username parameter to the target user while leaving the MFA code unchanged.
  4. Forward the modified request to the server.
  5. Observe that the application authenticates the session as the target user.

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.

Multi-factor authentication (MFA) asks for a second proof, like a code from an app, after your password. This report shows that if the server only checks that the code is valid but not which user it was issued for, someone can reuse their own valid code while changing the username to someone else's account. That lets them log in as that other person without knowing their password or having their MFA device.

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 Laibakashif

View all

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