Critical Authentication Bypass & Account Takeover via Attacker’s MFA Code
The application issued a valid session cookie as soon as an email address was submitted, before the password was checked. An attacker could log in with their own account, obtain an MFA code, then switch to the victim's email and reuse their own MFA code to access the victim's account.
Sharat Kaikolamthuruthil Follow
Published on medium.com
[## Critical Account Takeover (MFA + Auth Bypass) due to Cookie Misconfiguration
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 a session cookie before password verification and did not bind the MFA code to the same account or session, so a code from one account was accepted for another.
Impact
An attacker could take over any account, including admin accounts where MFA was mandatory, without knowing the victim's password.
What the attacker needed
Attacker has a valid account; victim's email address is known; MFA is enabled on the victim account
How it was found
- Enter the attacker's email on the login page and submit it.
- Enter the attacker's password and continue to the MFA page.
- Receive the MFA code sent to the attacker's email and note it down.
- Go back to the login page and enter the victim's email instead.
- Open the MFA page URL directly, skipping the password step.
- Submit the attacker's MFA code and gain access to the victim's account.
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.
When you type your email on a login page, the site should not give you a logged-in session until you have proved who you are with a password and a second code. Here the site handed out a session too early, and it did not check that the second code belonged to the same account as the email. So an attacker could use their own code to get into someone else'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.