Brute force and credential stuffing: rate limiting logins
Attackers don't need to crack your hashes if your login form lets them guess forever. Online brute force, credential stuffing with leaked passwords, and the layered limits that stop them without locking out real users.
In one sentence
Limit guesses per IP and per account, slow down rather than lock out, block known breached passwords, and require MFA so a correct guess still isn't enough.
The idea
Brute force tries many passwords against one account. Password spraying tries one common password against many accounts. Credential stuffing replays email/password pairs leaked from other sites, betting that people reuse them. All three go through your normal login form.
The password is #4,812 in a leaked wordlist.
Layered limits
| Control | Stops | Watch out |
|---|---|---|
| Rate limit per IP | A single machine hammering the form | Botnets and proxies rotate IPs |
| Backoff per account | Distributed guessing on one account | Hard lockouts let attackers lock out your users |
| Global anomaly alerts | Spraying and stuffing across accounts | Needs a baseline of normal failure rates |
| Breached-password check | The passwords attackers try first | Run it at sign-up and password change |
| MFA / passkeys | Correct guesses becoming takeovers | Push MFA needs number matching against fatigue attacks |
| CAPTCHA after failures | Cheap automated attempts | Accessibility cost; use as a step-up, not always |
Key takeaways
- 01Credential stuffing with leaked passwords is the most common login attack.
- 02Rate-limit per IP and per account, with backoff instead of hard lockout.
- 03Reject breached passwords and alert on unusual failure rates.
- 04MFA means a correct password alone doesn't give access.
Check your understanding
1 of 3
What is the most common login attack today?
Related concepts
Password storage
Never store passwords, store slow, salted hashes made with Argon2id or bcrypt. MD5 and SHA-256 are built to be fast, and fast is exactly what an attacker with GPUs wants.
7 min read →MFA & passkeys
Any MFA beats a password alone. But only phishing-resistant methods, passkeys and security keys, stop a real-time phishing proxy, because the browser checks the domain instead of trusting the human.
7 min read →Defense in depth
Every control has holes. Line up several independent ones and the holes rarely align: the Swiss cheese model.
6 min read →