Chain of Rate Limit Bypass and Weak Token Expiry Leads To Account Take Over
A password reset link relied on a single guessable code parameter that never expired, and the site's rate limit only blocked by IP address. By rotating source IPs, an attacker could keep guessing codes and reset another user's password, leading to account takeover.
The original lives on medium.com
We do not hold its text, 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 code was low-entropy and never expired, and the brute-force defence was keyed only on the client IP, so rotating IPs defeated it.
Impact
An attacker could guess a reset code and take over another user's account, though the guessing still takes time and depends on rotating IPs.
What the attacker needed
Victim's email known; attacker can send many requests; access to many rotating IPs
The fix
Reset codes should be long and random, expire quickly, and be rate limited per account and per code rather than only per IP.
How it was found
- Request a password reset and receive the emailed link containing the code parameter
- Leave the email unopened for a day and confirm the token still works
- Attempt to brute force the code and observe that a rate limit kicks in
- Notice that only the IP is blocked
- Rotate IPs with a Burp extension so each request comes from a new address
- Guess the code and reset 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 forget your password, a site emails you a special link with a secret code inside. If that code is short enough to guess and never stops working, someone can try many codes until one fits. The site tried to slow guessing by blocking the sender's network address (IP), but the attacker simply changed address each time.
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.