Skip to content

Field manual · ATO · Part II

2FA/MFA

The gate that guards the gate

3 min readBroken Access Control

Part II: 2FA and MFA: the gate that guards the gate

Section titled “Part II: 2FA and MFA: the gate that guards the gate”

Why care: a password breach should stop at 2FA, but most of these bugs let it walk straight through. 2FA flows multiply ATO paths because every step is another conversation with questions.

a) 2FA DISABLE without re-authentication:

Login with password → session marked "half-auth" → 2FA pending
POST /api/settings/2fa/disable
← if this WORKS while half-authenticated, password alone defeats 2FA

A shocking number of apps let you disable 2FA mid-login. Password compromise = account compromise, 2FA = theater.

b) Password reset kills 2FA (the reset-everything trap):

Reset victim's password → new password set → 2FA disabled as part of "recovery"

Terrible UX decision made by many large platforms historically (2FA erased on password reset so you can’t be locked out). If ATO via reset exists, 2FA never mattered. Check: after reset, does the app demand 2FA again?

c) 2FA enumeration/brute-force weaknesses:

POST /verify-2fa {"code":"000000"} ×999,999 — rate limit?
Response: "code invalid" vs "code expired" — can you distinguish live windows?

d) Backup codes & trust devices:

GET /api/settings/backup-codes as half-auth session — are codes visible?
"Remember this device" = a long-lived cookie — can you brute it, or is it bound?

e) The 2FA enrollment race (lovely modern bug):

1. Have valid password (from breach/phishing — or in bug bounty: your test account)
2. Fire in parallel:
A: enroll 2FA (sets new secret)
B: login-complete (session finalize)
If requests interleave: some apps will let login-complete without a verified device

Race enrollment flows, beautiful high-severity bug, documented on real programs.

f) OTP type-juggling, same as reset codes: send true, null, [], "", 0000 vs -1, hex, exponential notation 1e5. The client guesses wrong; the server’s comparison is loose.

g) The 2FA response reveal:

POST /login {"password":"..."}
→ some apps return {"require2FA": true, "tempToken": "xyz"}
POST /verify2fa {"tempToken":"xyz","code":"<bruteforce>"}

Half-auth tokens (tempToken), are they long-lived? Could they be replayed? Can the session be finalized by hitting the post-2FA endpoint (/login/complete, /session/promote) directly with the tempToken, skipping verification completely? The “skip the question” route, request the FINAL state directly:

Terminal window
## Try, in order, with only a half-auth tempToken:
GET /api/users/me
POST /login/complete
POST /session/upgrade
GET /api/account/data

Servers that only guard the UI path to 2FA, but the finalize endpoint exists and trusts the tempToken, hand you the account with password alone.

2.2 SMS/OTP interception and social-adjacent bugs

Section titled “2.2 SMS/OTP interception and social-adjacent bugs”
- Code delivery to the attacker: the flow lets you enroll YOUR number on
someone else's account mid-login (twin-switch at the phone level)
- OTP retries with the same code validity
- OTP reuse across sessions/devices

Any endpoint pair (enroll phone + verify) where enrollment binding is confused = same twin-switch as reset. Map every recovery channel: email, SMS, authenticator, backup codes, each is a conversation with the four failure modes.

2.3 Passkeys and WebAuthn: the downgrade is the bug

Section titled “2.3 Passkeys and WebAuthn: the downgrade is the bug”

Passkeys are the strongest consumer auth we have. The cryptography is not where they break. They break at the edges: the fallback method, the recovery flow, and the enrollment binding. Every one of those edges is an older, weaker conversation that still answers.

The downgrade. Not every device has a passkey yet, so a site that accepts one almost always also accepts a password, an OTP, or a magic link. If the login page offers “use your password instead,” the passkey protects nobody. Attack the weakest method the account still accepts, not the passkey itself.

The recovery bypass. “Lost your passkey?” is a reset flow with all four failure modes from Part I. If recovery hands out a session without re-proving possession of the passkey, you have taken over an account whose owner believes hardware protects them.

The enrollment twin-switch. Registering a passkey is an enroll-then-bind conversation, the same shape as the 2FA twin-switch. Suppose the server binds the new credential to a user id from the request body instead of the authenticated session. Then you enroll YOUR passkey on THEIR account.

Test it like this:

  • Register two accounts you own, A and B. Enroll a passkey on B only.
  • On B, list every other way to sign in. Each one is a bypass candidate.
  • Drive B’s lost-passkey recovery and see whether it re-checks possession or just mints a session.
  • On the enroll endpoint, swap the user handle in the registration-finish request from A to B.

Report the method that answers, not the ceremony that does not. A passkey login is only as strong as the weakest door left open beside it.

Next step: Part III covers the login endpoint itself, the classic mistakes that outlive every new auth factor.

Connections2 backlinks · 0 outgoing · 1 cross-guideFull graph →
Open local graph around this page
Open full graph →
Click a node to open · Drag to reposition · Scroll to zoom

Links out to

No outgoing internal links on this page.

Broken Access ControlFor authorized security research only: bug bounty programs, your own systems, or scoped engagements with written permission.