How I Made €200 Just by Changing a Response
The login API returned a 401 on a wrong password, but the client-side response could be altered to a 200 with an MFA-configured flag, which caused the app to show the MFA screen. The MFA verification endpoint then accepted a valid OTP without the server checking that the password step had actually succeeded, allowing login with only an OTP.
medium.com
Published on medium.com
While testing a login functionality during my testing , I came across something interesting.
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 server trusted a client-supplied response flag and did not enforce that the password authentication step had completed before accepting MFA verification.
Impact
An attacker who can phish or intercept a victim's OTP could log in without the password, resulting in full account takeover.
What the attacker needed
A valid OTP for the target account; ability to intercept and modify responses
How it was found
- Send a login request with a wrong password and observe the 401 response.
- Intercept the response and change it to 200 OK with an mfaConfigured true flag.
- Forward the modified response and observe the app showing the MFA screen.
- Submit a valid OTP to the MFA verification endpoint and become logged in.
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 checks your password and then may ask for a second code (MFA). Here the app let the browser's altered reply decide that the password step was done, and the server did not re-check it before accepting the second code. So anyone who had a valid second code could get in without knowing the 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.