Forget password OTP flaw lead to Account Takeover.
The password reset OTP validation response contained a token that was identical for all requests, allowing an attacker to reuse a saved successful response to bypass OTP verification for any victim. This enabled account takeover by changing the victim's password.
Published on medium.com
I am Abhishek palhere with my new blog ,In this blog I am going to give details about an easy P1 bug I encountered while hunting.
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 issued a static token in the OTP validation response that was not tied to the user or session, and the client-side flow trusted this token to grant access to the password reset page.
Impact
An attacker could take over any user's account by bypassing OTP verification and setting a new password.
What the attacker needed
Attacker has a valid account/email; victim's email address known; attacker can intercept HTTP traffic
The fix
The OTP validation response should not contain a static token; instead, it should issue a unique, session-bound token that is validated server-side for each password reset attempt.
How it was found
- Attacker requests a password reset for their own email and receives an OTP.
- Attacker enters the correct OTP, intercepts the validation request, and saves the response containing the static token.
- Attacker drops the request from the new password page.
- Attacker requests a password reset for the victim's email.
- Attacker enters a random OTP, intercepts the request, replaces the response with the saved one, and forwards it.
- The new password page opens, and the attacker changes the victim's password.
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 app sends a one-time code (OTP) to your email. The app checks the code and, if correct, returns a response that lets you set a new password. Here, that response was the same for every user, so an attacker could save their own valid response and replay it for a victim, skipping the code check entirely.
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.