OTP bypass via logic flaw
The server issued a valid JWT token immediately after password entry even when OTP was enabled, so the token could be used to access account data without completing the second factor. An attacker who obtained a password could bypass OTP entirely by using the token.
medium.com
Published on medium.com
Bug hunting is often like detective work — you see something small, and your “inner hacker” whispers: “What if…?”
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
Likely the authentication flow issued the session token before verifying the second factor, so the OTP check was not enforced before granting access.
Impact
An attacker who stole or guessed a password could bypass OTP and access the account using the token.
What the attacker needed
Valid username and password; OTP enabled on the account
The fix
The server should only issue a session token after the OTP step has been successfully completed.
How it was found
- Log in with username and password and observe the server returning a JWT token.
- Enable OTP (2FA) on the account.
- Log in again and observe that a valid JWT token is still returned before OTP verification.
- Use the token to make an authenticated request, such as fetching profile data.
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) adds a second step, like a one-time code (OTP), after your password. Here, the website gave out a login token (JWT) right after the password, before the code was checked. Anyone with the password could use that token to get into the account without ever entering the code.
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.