# Credential stuffing vs brute force vs password spraying

> Brute force tries many passwords against one account. Password spraying tries a few common passwords against many accounts, staying under lockout limits. Credential stuffing replays username and password pairs leaked from other sites, usually one attempt per account. Per-account lockouts stop brute force but do little against the other two, which need breached password checks, MFA and bot detection.

Category: Account attacks. Level: Basic. Updated: 2026-11-24.
Canonical page: https://stopbots.io/learn/account-attacks/credential-stuffing-vs-brute-force-vs-password-spraying/

All three attacks try to log in with passwords the attacker has no right to. They differ in where the passwords come from and how the attempts are spread across accounts, and that decides which of your defences will fire.

## How does each attack work?

Brute force targets one account, or a few, and tries password after password until one works. The guesses come from every possible combination or, more often, from a word list of likely passwords (a dictionary attack). MITRE ATT&CK calls the online version [password guessing](https://attack.mitre.org/techniques/T1110/001/), and OWASP calls it credential cracking (OAT-007). Online guessing is slow, so attackers aim it at accounts worth the effort: an admin panel, an SSH server, a WordPress login, one known executive.

[Password spraying](https://attack.mitre.org/techniques/T1110/003/) turns that around. The attacker picks one or a few passwords that many people use, such as a season and a year or the company name with a digit, and tries each against a long list of usernames. Each account sees one failed attempt, or two, spaced hours apart, so lockout rules never trigger. It works best where usernames are predictable, such as staff emails in the firstname.lastname format, and it is a common attack on corporate single sign-on, VPN and webmail.

[Credential stuffing](https://stopbots.io/learn/account-attacks/what-is-credential-stuffing.md) skips guessing. The attacker has real email and password pairs leaked from other sites and tries each pair once on your login. Every password in the list belongs to a real person, so the success rate per attempt is far higher than guessing. The traffic is usually spread over thousands of [residential proxy](https://stopbots.io/learn/bots/what-are-residential-proxies.md) addresses.

## How do the three attacks compare?

| | Brute force | Password spraying | Credential stuffing |
|---|---|---|---|
| Source of passwords | Guesses or word lists | A short list of common passwords | Real pairs leaked from other sites |
| Attempts per account | Many | One or two, spaced out | Usually one |
| Usernames tried | One or a few | Many, often valid staff accounts | Many, mostly emails from the list |
| Typical target | Admin panels, SSH, one known account | Corporate SSO, VPN, email | Consumer logins and mobile app APIs |
| What stops it first | Per-account delays or lockout | Blocking common passwords, MFA | MFA, breached password checks, bot detection |

## How do they look in your login logs?

Brute force is the easiest to see. One username collects dozens or hundreds of failures, often from a single IP address or a small group. A counter of failures per account over 15 minutes finds it.

A spray shows as a wave. Many different usernames each fail once within a short window, then the wave repeats hours later with the next password. Most of the usernames are valid, because the attacker built the list from your staff directory or from earlier enumeration. The traffic often comes from a few IP addresses or cloud hosting ranges.

Credential stuffing shows a high share of attempts on usernames that do not exist on your site, because the list came from somewhere else. Each username is tried once, the IP addresses are many and mostly residential, and the share of successful logins is higher than a spray would produce. That share of attempts on non-existent accounts is the quickest way to tell stuffing from a spray, which mostly hits valid accounts. [How to detect credential stuffing](https://stopbots.io/learn/account-attacks/how-to-detect-credential-stuffing.md) gives SQL for each of these patterns.

## Which defences cover which attack?

Per-account lockouts or growing delays stop brute force. They do nothing against stuffing, which tries each account once, and sprays are built to stay under them. Lockouts can also be turned against you: an attacker who knows your threshold can lock real customers out, so a delay or an extra check after a few failures is usually the better choice.

Per-IP rate limits stop brute force from a single source. They are weak against sprays and stuffing spread over many addresses, as covered in [what rate limits stop and what they miss](https://stopbots.io/learn/implementation/are-rate-limits-enough-to-stop-bots.md).

Blocking common and breached passwords cuts the supply for spraying and stuffing at once. NIST SP 800-63B-4 requires verifiers to compare new passwords against a blocklist that includes passwords from earlier breaches ([NIST SP 800-63B](https://pages.nist.gov/800-63-4/sp800-63b.html)).

Multi-factor authentication stops all three when the password is the only thing the attacker has. It has its own weak points, set out in [does MFA stop account takeover](https://stopbots.io/learn/account-attacks/does-mfa-stop-account-takeover.md).

Bot detection at the login endpoint matters most for stuffing, which depends on automation at a scale no human team could type.

## Tools that help

_StopBots is published by Kairal, which is one of the tools listed. The list is not a ranking._
- [fail2ban](https://github.com/fail2ban/fail2ban) reads server logs and bans IP addresses after repeated failures, which is free and enough against single-source brute force on SSH or a small admin login but misses attacks spread over many addresses.
- [CrowdSec](https://www.crowdsec.net/) is open source and blocks addresses using reputation shared across its user community, which suits small sites that want more than local log bans.
- [Pwned Passwords](https://haveibeenpwned.com/Passwords) is a free API that tells you whether a password appears in known breaches, so you can refuse it at signup and password change.
- [Cloudflare rate limiting rules](https://developers.cloudflare.com/waf/rate-limiting-rules/) count requests to your login path at the edge and fit sites that already run on Cloudflare.
- [Kairal](https://www.kairal.io/use-cases/account-takeover/) connects device, network and behavioural signals at login to detect credential stuffing and account takeover, with protection set per endpoint, and fits sites where distributed attacks get past IP limits.

## Common questions

### What is the difference between credential stuffing and a dictionary attack?

A dictionary attack runs a list of likely passwords, such as common words and their variants, against an account. Credential stuffing uses the exact password a specific person chose on another site, so the attacker needs only one attempt per account.

### Is password stuffing the same as credential stuffing?

Yes. Password stuffing is a less common name for the same attack: replaying leaked username and password pairs on a different site.

### Is credential stuffing a kind of password spraying?

Some sources, including the OWASP Top 10 2025 entry on authentication failures, use the term password spraying for attacks that try variations of leaked passwords. MITRE ATT&CK and most security teams use it for a few common passwords tried across many accounts, which is the meaning used on this page.

## Related

- [What is credential stuffing?](https://stopbots.io/learn/account-attacks/what-is-credential-stuffing.md)
- [How to prevent credential stuffing attacks](https://stopbots.io/learn/account-attacks/how-to-prevent-credential-stuffing.md)
- [Rate limiting for bots: what it stops and what it misses](https://stopbots.io/learn/implementation/are-rate-limits-enough-to-stop-bots.md)
- [OWASP automated threats: the 21 bot attacks in plain English](https://stopbots.io/learn/bots/owasp-automated-threats.md)
