P1 Vulnerability: How I chained Logical-Error to Account-Takeover Vulnerability 😈🧑💻that No-One said you before😁
The password reset flow had a logical error where changing a status parameter to 'fail' still sent an OTP, and the OTP had no rate limit, allowing brute force. After finding the correct OTP, the attacker could change the client-side status to 'success' and reset any user's password, leading to account takeover.
Published on infosecwriteups.com
Hello Hackers, This is Gowtham, An Ethical Hacker and Penetration Tester from India who loves to find loopholes😁. I gave a huge gap for my 2nd blog due to many factors! and I sincerely apologize to everyone.
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 did not enforce rate limiting on OTP attempts and relied on a client-side status parameter to determine OTP verification success.
Impact
An attacker could take over any user account by resetting their password, and access sensitive data such as address, phone number, name, and bank details.
What the attacker needed
Victim's mobile number or account identifier; ability to send password reset requests; no rate limit on OTP attempts
How it was found
- Send a password reset request and modify the status parameter to 'fail'.
- Observe that the OTP is still sent to the registered mobile number.
- Brute-force the OTP by sending random OTPs and noting the response length difference (575 for correct, 574 for incorrect).
- Enter the correct OTP in the previous request.
- Change the status parameter to 'success' to bypass client-side OTP verification.
- Change the password for any user and log in to their 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 forget your password, a site often sends a one-time code (OTP) to your phone. Here, the site let someone try many codes without slowing them down, and it also trusted a value shown in the browser to decide if the code was correct. By guessing the code and then changing that browser value, the attacker could 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.