Account Takeover via OTP Bruteforce (Apigee API)
The password reset flow used a six-digit OTP sent by email, but the OTP validation endpoint had no rate limiting. An attacker could brute-force the OTP and reset the password of any user account.
This is a short post on one of my findings in a Bugcrowd Private program, which could result in account takeover of any user by an attacker.
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 OTP validation endpoint lacked rate limiting or attempt limits, allowing unlimited guesses of a six-digit code.
Impact
An attacker could take over any user account by resetting its password, though the text does not state whether any defence limited the attack.
What the attacker needed
Target user has an account; attacker can trigger a password reset; OTP validation endpoint reachable
The fix
The issue was fixed by adding rate limiting to OTP validation, as confirmed in the disclosure timeline.
How it was found
- Start a password reset for a target account so an OTP is emailed to the user.
- Intercept the request that validates the OTP.
- Brute-force the six-digit OTP by repeatedly sending guesses.
- Use the correct OTP to set a new password for 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 your password, a site may email you a short numeric code (a one-time password, or OTP) that you type in to prove you own the account. If the site lets someone try that code over and over with no limit, a program can guess all possible codes quickly. Here the code was only six digits, so guessing it was feasible and let the attacker set a new password.
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.