How a Simple Business Logic Flaw Caused an Account Lockout DoS
The registration endpoint revealed whether an email address was already registered, allowing user enumeration. Combined with a lack of rate limiting on login attempts, an attacker could repeatedly send invalid logins to keep a known account locked indefinitely.
Published on medium.com
I decided to remove “/Username” and add it as a custom parameter in the body of the request:
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 registration endpoint returned different error messages for existing versus non-existing emails, and the login endpoint lacked rate limiting, allowing unlimited failed attempts.
Impact
An attacker could enumerate valid email addresses and then keep targeted accounts locked indefinitely, preventing legitimate users from logging in.
What the attacker needed
Ability to send HTTP requests; knowledge of target email address
The fix
The registration endpoint should return a generic response regardless of whether the email exists, and the login endpoint should enforce rate limiting to prevent unlimited failed attempts.
How it was found
- Send a registration request with an existing username and a target email address.
- Observe that the response includes an error if the email is already taken, confirming the account exists.
- Send repeated login requests with invalid credentials for a valid email address.
- Observe that the account remains locked because there is no rate limit on login attempts.
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.
The sign-up page told attackers which email addresses already had accounts, which is a privacy leak. Separately, the login system locked accounts after five wrong passwords but did not stop someone from sending many wrong passwords, so an attacker could keep a victim locked out forever.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.