2FA Bypass Using Custom Cookie Parameter
The mobile app's login request included an extra cookie parameter that skipped the second-factor check, and adding the same parameter to the web app's request bypassed 2FA there too. An attacker with valid credentials could log in without the 2FA code and then change the account's email or phone number to take it over permanently.
Sharat Kaikolamthuruthil Follow
Published on medium.com
The original lives on medium.com
We do not hold its text, 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 server used a client-supplied cookie parameter as a flag to decide whether 2FA was required, instead of enforcing the check server-side for every login.
Impact
An attacker with valid credentials could skip 2FA on both the mobile and web apps and change the account's email or phone number to take it over permanently; the report does not mention any defence that limited this.
What the attacker needed
Valid account credentials; account has 2FA enabled; ability to modify the login request
How it was found
- Install the mobile app and log in with an account that has 2FA enabled.
- Notice the app logs in without asking for the 2FA code.
- Compare the app's login request with the web app's request and spot the extra cookie parameter.
- Add that cookie parameter to the web app's login request and observe that 2FA is skipped there as well.
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 proof of identity, usually a code from an app or SMS, asked for after the password. Here the server trusted a value the client sent in a cookie to decide whether to ask for that code, so anyone who added the right cookie value was let straight in. Once inside, they could change the account's contact details and lock the real owner out.
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.