Test 2FA setup on unverified accounts

AuthenticationDiscovery

Written with a model's help from “One Login, Two Paths, One Critical Security Flaw CYSHIELD CTF 2026” by Isv0x1 on isv0x1 (Medium). Read the writeup before relying on it.

When testing an application with 2FA, try to enroll in 2FA as an unverified user by sending a POST to the /api/profile/2fa/setup endpoint with a session cookie from an unverified account. If the server returns a TOTP secret without verifying the account, it may indicate a flaw. Then, generate a valid TOTP code and submit it to the /api/profile/2fa/enable endpoint to enable 2FA. If 2FA is enabled without verification, try logging out and back in with the same credentials, completing the 2FA challenge. If the server redirects to a protected area without verifying the account, it may indicate an authorization logic flaw. Look for inconsistent authorization checks across different authentication paths, such as the initial login path and the 2FA path.

Follow #2fa or #authorization for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.