OTP bruteforce account takeover
The login flow used a one-time code sent by SMS, but the server did not limit how many times a code could be guessed. An attacker could try many codes in a row and log into any account.
Published on medium.com
This is my first 4 digit bounty in $$$$ and was really excited when I discovered a simple yet critical vulnerability in one of the private programme.
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 authentication endpoint lacked rate limiting or lockout on repeated OTP attempts.
Impact
An attacker could brute-force the OTP and take over any account, as demonstrated by logging in after many attempts.
What the attacker needed
Victim's mobile number; no rate limiting on OTP attempts
The fix
The issue was fixed by adding rate limiting to OTP attempts.
How it was found
- Enter a mobile number on the login page to receive an OTP.
- Submit an incorrect OTP and observe the invalid response.
- Repeat incorrect OTP submissions many times to check for rate limiting.
- Run an automated brute-force of the OTP until a valid response is returned.
- Use the valid OTP to log in and 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.
A one-time code (OTP) is a short number sent to your phone to prove it is you. If a website lets someone guess that number over and over without slowing them down, a criminal can eventually guess correctly and get into your 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.