Zero-Click Account Takeover Through Response Manipulation
The password reset flow relied on a client-side JSON response to decide whether the OTP was correct, so an attacker could intercept the server's failure response and replace it with a success response. This allowed resetting the password of any account, leading to account takeover.
medium.com
Published on medium.com
Welcome to my first write-up i hope u like it , I know introductions can be boring, so let’s get straight to the point!
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 password reset flow made a client-side decision based on a JSON response field (success/code) without the server independently verifying the OTP before allowing the password change.
Impact
An attacker could take over any account by resetting its password, as demonstrated by logging in with the new password.
What the attacker needed
Ability to intercept and modify HTTP responses; knowledge of a victim's email address
The fix
The server should verify the OTP and only allow the password change if the OTP is correct, not rely on a client-side response.
How it was found
- Go to the reset password page and start the process as a normal user, observing requests in Burp.
- Enter any email and any OTP, and intercept the response.
- Replace the response JSON with the success JSON and turn off interception.
- Enter a new password and see a 'Done!' message.
- Log in with the new password to confirm account takeover.
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 reset a password, the website asks for a one-time code (OTP) sent to your email or phone. Normally the server checks the code and only lets you continue if it is right. Here, the website's own page trusted a message from the server that said 'success' or 'incorrect', and the attacker could change that message in their browser to always say 'success', so the page let them set a new password for any 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.