What Is Credential Stuffing?How It Works and How to Stop It
What Is Credential Stuffing?
Credential stuffing is one of the most common and damaging attacks on authentication systems today. Attackers collect usernames and passwords from data breaches, which are sold and traded openly on the dark web. They then write scripts to try these credential pairs against banks, e-commerce sites, email providers, and any other service that has a login form.
The numbers make this attack effective at scale. A typical breach might expose tens of millions of credential pairs. Even if only 0.5% of users reuse the same password on another site, an attacker with 50 million credential pairs gains access to 250,000 accounts. Automated tools can attempt thousands of logins per second, so these attacks can run against an entire application in minutes.
How Is Credential Stuffing Different From a Brute Force Attack?
These two attacks are often confused, but they work in completely different ways. Understanding the difference helps you choose the right defences for each one.
| Attack | What It Tries | Source of Credentials | Speed | Success Rate |
|---|---|---|---|---|
| Credential Stuffing | Real leaked username and password pairs | Data breaches and dark web databases | Thousands of attempts per second | 0.1% to 2% of attempts succeed |
| Brute Force | Every possible password combination | No prior data needed | Slower due to the number of combinations | Very low unless password is short or common |
| Dictionary Attack | A list of common words and patterns | Wordlists and common password databases | Fast | Higher against weak passwords |
How Does a Credential Stuffing Attack Work?
A credential stuffing attack follows a clear sequence of steps. Each step is mostly automated, which is why it can run against thousands of accounts in a short time.
- Obtain a breach database. The attacker downloads a list of username and password pairs from a data breach. These lists are freely available on dark web forums or sold for low prices.
- Parse and deduplicate the list. Automated tools clean the data, remove duplicates, and format it for use in the attack tool.
- Configure the attack tool. Tools like Sentry MBA, OpenBullet, or custom scripts accept the credential list and a configuration file for the target site's login endpoint.
- Run the attack at scale. The tool sends thousands of login requests per second, often using residential proxy networks to bypass IP-based rate limiting and appear as legitimate traffic.
- Collect valid credentials. The tool logs which credential pairs succeeded. The attacker then uses these accounts manually or sells them to other criminals.
Why Do Credential Stuffing Attacks Succeed?
Three conditions make credential stuffing consistently effective. Fixing any one of them significantly reduces your risk.
- Password reuse is widespread. Studies consistently show that between 50% and 65% of users reuse passwords across multiple accounts. This means a breach on one site gives attackers access to other sites.
- Breach databases are enormous and freely available. Over 15 billion credential pairs are known to exist in circulation from historical breaches. New breaches add millions more every month.
- Most applications have no velocity checks. Without rate limiting, lockout, or bot detection, an application treats 10,000 login attempts from 10,000 different IP addresses as normal traffic.
- Residential proxy networks defeat IP blocking. Attackers route login attempts through millions of residential IP addresses, so blocking a single IP has no effect.
- Multi-factor authentication adoption is low. MFA stops credential stuffing entirely, but most applications do not require it, and many users do not enable it voluntarily.
How Can You Detect Credential Stuffing?
Credential stuffing traffic often looks like legitimate user behaviour from the outside. But there are patterns you can monitor to detect it early.
- A spike in failed login attempts across many different accounts and IP addresses at the same time
- A higher than normal ratio of failed logins to successful logins
- Login attempts arriving at a consistent rate rather than in the irregular bursts normal users produce
- Login attempts against accounts that have not been active in months or years
- Successful logins from IP addresses or geographies that do not match a user's history
- A surge in password reset requests shortly after a login spike
How to Stop Credential Stuffing: OWASP Checklist
- 1Check passwords against the HaveIBeenPwned Pwned Passwords API at registration and login. Reject any password found in a known breach.
- 2Rate limit your authentication endpoint. Limit login attempts per IP address, per account, and globally across the application.
- 3Implement account lockout or progressive delays after a configurable number of failed attempts.
- 4Deploy bot detection or CAPTCHA on your login form, especially after repeated failures.
- 5Require multi-factor authentication for sensitive accounts or as an optional setting for all users.
- 6Log all failed login attempts with timestamps, IP addresses, and user agents. Alert on unusual spikes.
- 7Monitor for logins from new devices or unusual locations and trigger a step-up authentication challenge.
- 8Notify users of login attempts from new locations or devices so they can take action if the login was not from them.
What Does OWASP Say About Credential Stuffing?
OWASP addresses credential stuffing directly in the Authentication Cheat Sheet and in the ASVS 5.0 controls. OWASP recommends verifying passwords against breach databases at login using the HaveIBeenPwned k-anonymity API, implementing rate limiting and lockout at the application level, and requiring MFA for high-risk accounts. OWASP also recommends logging all authentication events, including failures, and monitoring those logs for signs of automated attack traffic.
The ASVS 5.0 V2 Authentication requirements include specific controls for breach notification (V2.1.7), rate limiting (V2.2.1), and lockout policy (V2.2.2). Meeting these controls significantly reduces exposure to credential stuffing as well as brute force attacks.