Day 27: The $2,200 ATO Most Bug Hunters Overlooked
The application used a six-digit OTP for login but did not actually enforce a lockout after repeated wrong guesses; it merely returned 401 responses while still accepting a correct OTP. An attacker could brute-force the OTP space and take over any account.
medium.com
Published on medium.com
Today’s Account Takeover (ATO) vulnerability was found by Mohsin Khan, and it’s a perfect example of why persistence in bug hunting matters.
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 returned 401 for wrong OTPs but never actually locked the account or rate-limited correct guesses, so the apparent block was only cosmetic.
Impact
Full account takeover was possible through OTP brute force because there was no real lockout or brute-force protection.
What the attacker needed
Victim's email address known; ability to send many OTP guesses; no real rate limit or lockout
The fix
The application should enforce a real lockout or progressive delay after a small number of failed OTP attempts and invalidate the OTP after repeated failures, rather than only returning 401.
How it was found
- Capture the OTP submission request in an intercepting proxy.
- Send the request to an automated brute-force tool to try many OTP values.
- Observe that after about 20 wrong guesses the server returns 401 for further attempts.
- Keep the brute-force running despite the 401 responses.
- After roughly 200,000 requests, one response returns 200 OK with an access token.
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 password (OTP) is a short code sent to your email or phone to prove it is you. Here the site looked like it blocked guessing after a few wrong tries, but it only showed an error message; the correct code still worked. So someone could keep guessing codes until they hit the right one and get into another person's 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.