Account Takeover with rate limit bypass
The password reset confirmation code could be brute-forced because the attempt limit could be bypassed by adding a spoofed forwarding header. An attacker could guess the code and reset the password of any account, taking it over.
Published on medium.com
Hi guys, I’m Shamim Ahamed . It’s my first bug bounty write-up about my valid bug which could have allowed a malicious user to take over any account on that target site.
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 reset endpoint trusted a client-supplied forwarding header when applying its attempt limit, so rotating that header value reset the counter and allowed unlimited code guesses.
Impact
An attacker could reset the password of any account whose username they know, leading to full account takeover.
What the attacker needed
Victim's username or email known; no login needed
How it was found
- Send a password reset request and capture the confirm-forgot-password call in an intercepting proxy.
- Notice the confirmation code field in the request body.
- Brute-force the code with the proxy's intruder and observe the attempt-limit error.
- Add a spoofed forwarding header to the request and see the limit no longer applies.
- Rotate the header value across requests and keep brute-forcing until a valid code is found.
- Submit the valid code with a new password to take over the 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 a password, the site emails you a short numeric code to prove the account is yours. This site let someone keep guessing that code, and the block that should stop repeated guesses could be dodged by pretending each request came from a different address. With enough guesses the right code is found and the password can be changed.
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.