Skip to content
Business logic Write-up Beginner

How a Misplaced 2FA Lockout Can Prevent Legitimate Users from Log

The two-factor authentication lockout was enforced globally per phone number rather than per account, so failed attempts on any account sharing a number locked every account using it. An attacker who knows a victim's phone number could register an account with it and repeatedly submit wrong codes to keep the victim, including admins, from logging in.

Ibrahim Yılmaz Follow

Published on medium.com

While testing a financial web application, I noticed an unusual behavior in its two-factor authentication (2FA) lockout mechanism. At first, it seemed that repeated failed 2FA attempts only affected users within the same team.

Ibrahim Yılmaz, 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

The 2FA failure counter was keyed on the phone number field instead of the account ID, so the lockout applied to every account sharing that number.

Impact

An attacker who knows a victim's phone number could repeatedly lock every account tied to it, including admins, preventing login and potentially delaying financial approvals or disrupting workflows.

What the attacker needed

Knowledge of the victim's phone number; ability to register an account with that number; platform allows multiple accounts per phone number

The fix

Lockouts should be applied per account ID rather than per phone number, and multiple registrations with the same phone number should be restricted or require ownership verification.

How it was found

  1. Enter several wrong 2FA codes on a low-privileged account that shares a phone number with an admin account.
  2. Observe the system returns HTTP 429 Too Many Requests after around five failures.
  3. Try logging in to the admin account with correct username and password.
  4. See that the 2FA screen is skipped and a 429 error is returned right after the password step.
  5. Create an independent account with the same phone number outside any team and repeat the lockout.
  6. Confirm all accounts using that number, including the original admin, are blocked from logging in.

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 login step, often a code sent to your phone. This site counted wrong 2FA codes against the phone number itself, not the individual account. So anyone who knew your number could lock you out of every account that used it by entering bad codes on purpose.

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 Ibrahim Yılmaz

View all

1 more disclosed report, 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.