Skip to content
Account takeover Write-up Beginner

Weird and simple 2FA bypass

The application's two-factor authentication backup codes were not validated, so any random eight-digit number was accepted. An attacker who knew a victim's email and password could bypass the second factor and log in.

Rushiikesh Follow

Published on medium.com

Bounty$700 View original

Hi everyone, Today, I would like to talk about a weird vulnerability which I found on a private program that allowed me to bypass their 2FA protection without any test.

ultranoob, 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 backup code verification logic did not compare the submitted code against the stored valid codes, accepting any eight-digit input.

Impact

An attacker who knew a victim's email and password could bypass the second factor and log in, but the text does not state whether any other defences limited this.

What the attacker needed

Victim's email and password; 2FA enabled on the account

The fix

The backup code validation was fixed according to the timeline.

How it was found

  1. Enable 2FA on the account and note the backup codes.
  2. Log out of the application.
  3. Enter the email address and password to reach the 2FA prompt.
  4. Choose the option to log in using a backup code.
  5. Enter a random eight-digit number instead of a real backup code.
  6. Observe that the login succeeds.

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 to logging in, such as a code from an app. Backup codes are extra codes you can use if you lose your phone. Here, the system did not check whether the backup code was real, so typing any eight-digit number let the person in.

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.