2FA Bypass via Session Fixation — High Vulnerability in Ver
The platform did not invalidate old session tokens when a login reached the second-factor step, so a previously issued session cookie could be replayed to skip the 2FA prompt. An attacker holding an old session token could log in without a valid 2FA code.
Published on medium.com
Hi, I’m Hasan Khan, a Web Application Penetration Security Researcher and bug bounty hunter from Bangladesh. I specialize in ethical hacking, vulnerability analysis, and dynamic application security testing.
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 application issued or kept a valid session before 2FA completion and did not invalidate or rotate it, so the session was not bound to a successful second-factor check.
Impact
An attacker with a previously valid session token could bypass 2FA and take over the account, even after the user logged out.
What the attacker needed
A valid account with 2FA enabled; an old session token from a prior login; ability to intercept and modify responses
The fix
The application should invalidate prior session tokens when 2FA is triggered and bind new sessions to successful 2FA completion with token rotation.
How it was found
- Log in with email and password and reach the 2FA prompt.
- Enter a random 2FA code and intercept the request.
- Intercept the response and replace it with a redirect that sets old session cookies from a previous login.
- Follow the redirect and reach the dashboard without a valid 2FA code.
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 check, such as a code, after your password. A session token is a cookie that keeps you logged in. Here, the site kept accepting an old session cookie even when the login had not passed the 2FA step, so someone with that cookie could get in without 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.