Skip to content
Business logic Write-up Intermediate

Pre-Denial Of Service (set-up 2FA on unverified account)

An unverified account could still complete the two-factor authentication setup by sending the MFA generation request before the secret-key request, which the server did not gate on email verification. An attacker could therefore bind 2FA to an email address they do not own, locking the real owner out of the site later.

Vikash Maurya Follow

Published on medium.com

Here I will explain how I was able to setup 2FA on a unverified account which results denial of service for real user of that email. (Assuming victim has not registered his account yet).

Vikash Maurya, 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 enforced the email-verification check only on the secret-key request and not on the preceding MFA generation request, so calling them in order bypassed the check.

Impact

An attacker could set up 2FA on an unverified account, which could block the real owner of that email from accessing the site in future.

What the attacker needed

Attacker can register an account; victim has not registered yet; websocket access to the app

The fix

The email-verification check should be enforced on every step of the 2FA setup flow, including the MFA generation request; the report says it was fixed.

How it was found

  1. Sign up an account and log in without verifying the email address.
  2. Send the MFA generation request over the websocket, which returns a blank response.
  3. Send the secret-key request, which now returns the secret key.
  4. Add the secret key to an authenticator app to complete 2FA setup.

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 sign up, a site usually asks you to confirm your email address before letting you add extra security like a code-generating app. Here the site checked that confirmation only on one of the two steps needed to set up that extra security, so skipping the first step let the second one work anyway. Someone could then attach their own authenticator app to an email address they do not control, and the real owner would be shut out.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by Vikash Maurya

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.