How I Bypassed 2FA Twice on the Same Target
The authentication flow returned a response containing only a 'ready' flag set to false, and changing it to true in the client allowed login without completing 2FA. Separately, the OTP verification checked only that the code was valid and the trigger UUID existed, not that they belonged to the same user, so an attacker could reuse their own OTP with a victim's UUID to log in.
medium.com
Published on medium.com
So as usual, I kicked things off poking around the auth flow straight to the 2FA functionality.
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 client-side response was trusted to indicate 2FA completion, and the OTP verification did not bind the code to the user identifier.
Impact
An attacker could bypass 2FA and log in as another user, potentially taking over accounts.
What the attacker needed
A free account; victim has 2FA enabled; attacker can intercept/modify responses
The fix
The server should not trust client-side flags for 2FA completion, and OTP verification should bind the code to the user identifier.
How it was found
- Start the authentication flow and reach the 2FA step.
- Observe the response containing a 'ready' flag set to false.
- Change the flag to true in the response.
- The application logs the user in without a valid OTP.
- Create two accounts and enable 2FA on both.
- Trigger OTPs on both accounts and note the attacker's OTP and UUID.
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 step after your password, usually a one-time code. Here the server trusted a simple 'ready' flag sent to the browser, so changing it to true skipped the second step. In the second bug, the server checked the code and the account identifier separately but never checked they matched, so one person's code could unlock another person's account.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.