Day 23: Account Takeover via Response Manipulation
The 2FA and password reset flows accepted a client-side response flag as proof of OTP verification, so an attacker could flip the error flag in the intercepted response and proceed without a valid code. This allowed bypassing 2FA and resetting any user's password, leading to full account takeover.
Published on medium.com
Today’s Account Takeover (ATO) vulnerability was discovered by Abhishek (Bug Hunter). This critical authentication flaw allowed 2FA bypass and password reset hijacking using simple response manipulation.
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 made authentication decisions based on a client-controlled response field rather than validating the OTP server-side.
Impact
An attacker could bypass 2FA and reset any user's password without user interaction, resulting in full account takeover.
What the attacker needed
Valid credentials for the target account; ability to intercept and modify responses; victim email address known
The fix
The server should validate the OTP before proceeding and only return success when the code is valid, rather than relying on a client-side response flag.
How it was found
- Log in with valid credentials and reach the 2FA verification page.
- Enter a random OTP and intercept the request in a proxy.
- Modify the response error flag and forward it to bypass 2FA.
- Go to the forgot password page, enter an email and request an OTP reset.
- Enter a random OTP, intercept the response and modify the error flag.
- Reach the password reset page and change the password to take over the 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 log in, the server sends back a small message saying whether your one-time code was right. Here the website trusted a value in that message that the attacker could edit in their browser proxy, so they could make a wrong code look accepted. That let them skip the second login step and even reset someone else's password.
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.