When Rate Limiting Fails Silently: Turning OTP Abuse into Accoun
The application's OTP verification endpoint lacked rate limiting and attempt limits, allowing an attacker to brute-force the 6-digit OTP and take over accounts. Additionally, OTP initiation responses were cached by a CDN, enabling cache poisoning that further weakened authentication.
Free Link🎈
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 backend did not enforce rate limiting or attempt limits on the OTP verification endpoint, and the CDN cached POST responses without proper cache-control headers.
Impact
An attacker could take over user accounts by brute-forcing OTPs, and cache poisoning could further disrupt authentication for other users.
What the attacker needed
Victim's phone number; no rate limiting on OTP verification; OTP is 6 digits
How it was found
- Discover the hidden OTP initiation endpoint via JavaScript analysis.
- Send repeated OTP initiation requests to confirm lack of rate limiting.
- Brute-force the OTP verification endpoint with a large number of attempts.
- Successfully obtain a session token for the victim 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.
An OTP is a one-time password sent to your phone. The app allowed unlimited guesses of this code, so an attacker could try all possible 6-digit numbers until they found the right one. This let them log in as someone else.
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.