BERRY9 IT SERVICES

Passkeys, WebAuthn & MFA Bypass Testing in Web Apps

How penetration testers test WebAuthn, passkeys, TOTP, and SMS MFA implementations for session upgrade flaws, OTP brute force, and recovery bypasses.

Web & App Security · By Thimmagurudu Bathini, CTO · Published · 5 min read

Passkeys, WebAuthn & MFA Bypass Testing in Web Apps architecture and testing overview

How Pre-MFA Sessions Undermine Strong Factors

Adding MFA or passkeys does not automatically prevent account takeover if the backend issues a full session token before the second factor completes—or allows password-reset and backup-code flows to skip MFA altogether. Testers examine every state transition between primary login and MFA verification.

# Step 1 returns partial session cookie before OTP is verified
GET /api/v1/account/api-keys HTTP/1.1
Cookie: sid=pre_mfa_session_cookie
# Vulnerable app returns 200 OK; secure app returns 401/403 mfa_required

Four MFA & WebAuthn Bypass Patterns

MFA and WebAuthn bypass vectors tested manually
MechanismBypass VectorProper Fix
Pre-MFA SessionSession cookie works on API endpoints before OTP screenIssue restricted pre-auth token valid only for /mfa/verify
OTP VerificationNo rate limit or lockout on 4–6 digit TOTP/SMS codesEnforce strict attempt caps, short TTL, and IP/account throttling
WebAuthn / PasskeyMissing challenge freshness or rpId origin validationBind cryptographic challenge per session and verify rpId strictly
Account RecoveryPassword reset or OAuth login logs user in without MFARequire MFA challenge after reset or invalidate active sessions

Checking Challenge Binding & Recovery Flows

  • Intercept post-password login responses and attempt to call authenticated API routes before submitting the OTP.
  • Test MFA enrollment and disable endpoints for CSRF, missing current-password checks, and race conditions.
  • Verify WebAuthn registration and assertion endpoints validate challenge uniqueness, userVerification flags, and rpId.
  • Check backup recovery codes for entropy, one-time invalidation, and rate limiting.

Enforcing MFA State Server-Side

Enforce MFA state server-side inside session claims rather than relying on frontend routing redirects.

Verify your login, WebAuthn, and OTP recovery state machine with manual VAPT from ₹36,000 + 18% GST. Request a scoped proposal →

MFA & Passkey Testing Questions

Are passkeys immune to all login vulnerabilities?

Passkeys stop phishing and credential stuffing, but server-side logic bugs in recovery, session binding, and account linking still require manual testing.

Do you test MFA bypasses during web and API VAPT?

Yes, every authenticated assessment tests login, MFA, session lifecycle, and recovery paths.