In-depth lesson · OTP brute force
Root causes
Every point the OTP brute force reports back under this heading, best-backed first, each with the reports it is seen in.
-
The verification endpoint had no rate limit, lockout or delay on failed attempts.
Seen in 18 reports
-
Short numeric or small-charset codes made brute force feasible.
Seen in 11 reports
-
OTPs or verification tokens never expired or stayed valid far beyond their stated lifetime.
Seen in 8 reports
-
The server trusted a client-supplied response field or parameter to decide OTP success.
Seen in 7 reports
-
The endpoint returned distinguishable responses for valid and invalid codes or accounts.
Seen in 7 reports
-
Rate limiting was keyed only on client IP or a client-supplied header, so it could be reset at will.
Seen in 5 reports
-
The OTP was not bound to the specific email, phone number or session it was issued for.
Seen in 5 reports
-
Rate limiting applied to one flow or API version but not to a parallel endpoint or older version.
Seen in 5 reports
-
Old OTPs were not invalidated when new ones were issued, so many valid codes existed at once.
Seen in 4 reports
-
The server trusted client-supplied identifiers such as uid, actor_id, cuid or phone number without ownership checks.
Seen in 4 reports
-
The OTP value was returned in the network response to the client.
Seen in 3 reports
-
OTP length or strength was chosen from a client-supplied parameter.
Seen in 2 reports
-
Default test phone numbers left enabled in production accepted any OTP.
Seen in 1 report
-
Email addresses were compared without case normalisation and without duplicate checks.
Seen in 1 report
-
The lockout timer was based on the device's local clock rather than server time.
Seen in 1 report
-
High
-
-
The reset token could be reused and reissued without limit, and retry limits were per token.
Seen in 1 report
-
The server did not validate OTP completion state and relied on client-side responses.
Seen in 1 report
-
The server treated each step of a multi-step flow independently and trusted client-supplied identifiers at the final step without confirming the earlier verification.
Seen in 1 report
-
The server trusted a client-encrypted OTP value without independently checking it against the expected value, and the keys were exposed in client code.
Seen in 1 report
-
The application trusted a client-supplied user identifier and created an authenticated session before confirming the OTP belonged to that user and session.
Seen in 1 report
-
The server derived the identity for 2FA verification from a client-controlled cookie instead of the server-side session and generated codes for any username supplied.
Seen in 1 report
-
The password change endpoint took the target username from a hidden form field rather than the session, and error messages differed depending on whether the current password was correct.
Seen in 1 report
-
The application made the OTP decision in the frontend based on a response field, and the reset endpoint did not require a server-issued proof of verification.
Seen in 1 report
-
The application kept validating codes and returned a differential response even while the lockout state was active, and the code stayed valid.
Seen in 1 report
-
The rate limiter counted HTTP requests instead of GraphQL operations, and the OTP-verify mutation had no failed-attempt lockout.
Seen in 1 report
-
The application used PHP loose equality to compare the submitted OTP with the stored integer OTP.
Seen in 1 report
-
OAuth2 client credentials were embedded in frontend JavaScript and downstream APIs accepted any valid token without checking the caller.
-
The server decided the account was verified without checking that the submitted code matched the one it issued.
Seen in 1 report
-
The rate limit was keyed to the source IP address rather than the recovery code, and throttled sources were slowed but never blocked.
Seen in 1 report
-
The server treated the submitted code as a list and checked each entry against the valid code instead of requiring a single string.
Seen in 1 report
-
The SMS code verification endpoint lacked a strict attempt limit that could not be bypassed by changing IP addresses.
Seen in 1 report
-
The server failed to validate that the email or mobile number in the reset request matched the account owner and accepted arrays or changed numbers.
Seen in 1 report
-
The account unlock functionality lacked rate limiting, allowing the failed 2FA attempt counter to be reset indefinitely.
Seen in 1 report
-
The OTP endpoint lacked rate limiting or lockout, and the registration flow allowed a phone number already linked to an account to be reused.
Seen in 1 report