How I Discovered a Sneaky Account Takeover Vulnerability
The password reset flow sent both the PAN number and the user ID in the same request, and the server did not check that they belonged to the same person. An attacker could swap in another user's identifiers, skip OTP validation and set a new password on that account.
Published on sumedhgharpande.medium.com
Greetings, cybersecurity enthusiasts! In this blog, we’ll walk through the intricate process that allows attackers to bypass access controls, manipulate OTP validation, and ultimately take control of unsuspecting users’ accounts.
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 the user-supplied user ID and PAN together without verifying that the authenticated reset session, the OTP and the target account all belonged to the same user.
Impact
An attacker could take over another user's account without the legitimate user's knowledge, provided they knew the victim's PAN and user ID.
What the attacker needed
Victim's PAN number and user ID known; attacker completes their own OTP step
The fix
The server should bind the reset session and validated OTP to a single account and reject any request where the identifiers do not match that account.
How it was found
- Start a password reset by entering a PAN number and requesting an OTP.
- Receive the OTP on the registered mobile number and submit it.
- After OTP validation, reach the change-password request and inspect it.
- Replace the PAN and user ID values with those of another user.
- Submit the request; the system accepts the mismatch and the password is changed.
- Log in to the victim's account with the new 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 forget a password, a site usually checks who you are before letting you set a new one. Here the site asked for two pieces of identity information but never checked they matched the same person. So someone could put in their own details plus a victim's details and the site would let them reset the victim'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.