Security operations

How to Detect Credential Stuffing Before Accounts Fall

Each stuffed login looks like an ordinary failed sign-in. The attack is only visible in the aggregate — many accounts, one source, one try each — so here is how to spot that shape in your logs.

Cysoro Security TeamPublished · 8 min read
LOGIN ATTEMPTS — 10 MIN412 users · 1 IP · 3 loginsPattern: credential stuffing Spot the pattern SECURITY OPERATIONS Detect credentialstuffing Many users, one source, one try each.
Quick answer

Detect credential stuffing by watching for many failed logins using different usernames from one source in a short window, a sharp rise in login failures across many accounts, and a few successes hidden among the failures. Combine per-username and per-IP rate limits, breached-password checks, device and location anomalies, and multi-factor authentication to confirm and stop it.

Key takeaways

  • One failed login means nothing; many different usernames from one source in minutes is the signature of credential stuffing.
  • Per-username and per-IP rate limits, breached-password checks, and risk-based MFA together stop most attacks.
  • Treat every success that follows a burst of failures as a compromised account until you prove otherwise.

A credential stuffing attack does not look like an attack. Each login attempt is a real username and a real password, typed once, from an ordinary-looking browser. Only when you step back do you see the pattern: thousands of different accounts, tried in minutes, from a handful of addresses.

What is credential stuffing?

Credential stuffing is an automated attack that replays username and password pairs stolen in a breach of one service against the login pages of other services. It succeeds when people reuse the same password in more than one place.

Unlike brute force, nothing is guessed. Each pair is a credential that worked somewhere, so the attacker only needs to learn whether it works here. MITRE ATT&CK lists the technique as T1110.004 Credential Stuffing, under Brute Force, and notes that attackers commonly target SSH, RDP, FTP, SMB, LDAP, Kerberos, and web login and email services.

The pairs come from breach dumps, criminal marketplaces, and phishing. Attackers load them into automated tools, rotate through proxy addresses, and test them at scale. A success rate of well under 1 percent is still profitable when millions of pairs are tested: a few hundred working accounts can mean stolen money, data, or a foothold for a larger attack.

How does a credential stuffing attack work?

An attacker obtains a list of stolen credentials, feeds it to an automated tool, and tries each pair once against your login endpoint. Successful logins are separated out for account takeover, while failures are discarded.

How credential stuffing works1. BreachPairs stolen fromanother service2. AutomationBots try each paironce, at scale3. Low hit rateMost fail; a fewlogins succeed4. TakeoverMoney, data orfurther accessPassword reuse is the fuel: the same pair works on more than one service.
The four stages of a credential stuffing attack. Illustration by Cysoro.

Modern attacks are hard to spot because they are distributed. Attackers use residential proxies, rotate user agents, solve CAPTCHAs, and slow down just enough to stay under simple per-IP limits. Some even replay sessions through real browsers to look human.

Once inside, attackers move fast: they change the email or phone number on the account, add a forwarding rule, withdraw funds, buy goods, or use the account to send phishing to contacts. The window between a successful stuffed login and the damage is often minutes.

What are the signs of credential stuffing?

The clearest sign is many failed logins for many different usernames from one source in a short window, with one attempt per username and a few successes mixed in. A real user who mistypes retries the same account; a bot moves on to the next one.

  • Distinct usernames per source. One IP address tries dozens or hundreds of different accounts in minutes. This is the single most useful signal.
  • Failure rate spikes. Total login failures jump sharply, while the success rate falls, because most stolen pairs do not work on your service.
  • One attempt per account. Almost every username appears once and never again, unlike a brute-force attack that hammers one account.
  • Successes after a burst. A login that succeeds immediately after a wave of failures from the same source is a likely takeover.
  • Impossible travel and new devices. A login from a new country, device, or browser minutes after the last legitimate login, especially at an odd hour.
  • Unusual user agents and headless patterns. Identical or outdated user agents, missing browser features, or traffic from datacenter address ranges where your users rarely appear.
  • Spikes on other endpoints too. Password reset, registration, and account recovery endpoints may surge at the same time as attackers test and validate accounts.

None of these signals proves an attack on its own. Together, in the same time window, they are a strong match. The OWASP cheat sheet on credential stuffing prevention lists the same layered signals and stresses that no single defense is enough alone.

How do I detect credential stuffing in my logs?

Start with three counts over a rolling window, such as 10 minutes: failed logins per source IP, distinct usernames per source IP, and total login failures across the whole endpoint. Alert when any of them leaves its normal range.

First, build a baseline. Know your normal failure rate, your peak login volume, and how many distinct accounts a single IP normally touches. A shared office or university NAT can legitimately show many accounts from one address, so set thresholds from your own traffic, not from a generic number.

Next, write the detection as a query, not a manual check. Count failed logins grouped by source IP and username, and flag sources with a high count of distinct usernames and a low success rate. Also chart total failures per minute across the login endpoint, because attackers who rotate IPs defeat a per-IP count but still create a global surge.

Then add the follow-up that matters most: list every account that logged in successfully from a flagged source, or immediately after a burst, and treat those accounts as compromised until reviewed. Check them for changed contact details, new MFA devices, forwarding rules, and unusual transactions.

Finally, keep the raw evidence. Store the source IP, user agent, timestamp, username, and result for each attempt, and keep it long enough to support an investigation. If you use a SIEM, create a dedicated dashboard for login anomalies so the on-call team sees the shape of an attack in one view.

SignalWhat to measureWhy it matters
Distinct users per IPFailed logins, distinct usernames, per source, per 10 minutesHigh count means automated testing, not a forgetful user
Global failure surgeTotal login failures per minute, all sourcesCatches attackers who rotate IPs
Success after a burstSuccessful logins from flagged sourcesPoints directly at taken-over accounts
New device or locationDevice, country, and ASN versus account historyFlags logins that do not match the real user
Endpoint spreadFailures on login, reset, and recovery togetherShows validation and account testing, not just login

Credential stuffing vs brute force vs password spraying?

These three attacks are often confused, but they leave different footprints in your logs, so telling them apart decides which detection rule fires. All three abuse the login endpoint; only the pattern of usernames and passwords differs.

Credential stuffingBrute forcePassword spraying
What is testedReal stolen pairs, once eachMany passwords, one accountOne weak password, many accounts
UsernamesMany different accountsOne account, repeatedlyMany different accounts
Log shapeMany users, one try each, one sourceOne user, many failuresMany users, same password, few failures each
Best first controlBreached-password check and MFAPer-account rate limit and lockoutPassword policy and MFA

OWASP draws the same lines in its cheat sheet: brute force tests many passwords against a single account, credential stuffing tests pairs obtained from a breach of another site, and password spraying tests a single weak password against many accounts. The defenses overlap, but the detection queries do not.

What does a real credential stuffing attack look like?

In December 2022, PayPal confirmed that attackers accessed 34,942 customer accounts using credentials obtained elsewhere. The unauthorized access ran from December 6 to December 8, and PayPal discovered it by December 20.

The attackers did not breach PayPal itself. They logged in with valid credentials, which is exactly how credential stuffing works: the passwords were real, they simply belonged to other services first. Exposed data included names, addresses, dates of birth, Social Security numbers, and tax identification numbers.

PayPal reset the passwords of the affected accounts, added enhanced security controls, and offered two years of identity monitoring. The lesson for defenders is blunt: a login with the right password is not proof of the right person, and a service that accepts reused passwords will eventually accept stolen ones.

How do I stop credential stuffing?

Stop it in layers. Multi-factor authentication is the strongest single control, and rate limits, breached-password checks, and device risk signals catch what MFA cannot reach.

Five layers that stop credential stuffing1Multi-factor authenticationA stolen password alone is not enough to log in2Rate limits per user and per IPTwo independent limits, so rotating IPs does not help3Breached-password checksReject passwords already seen in known breaches4Risk-based step-up checksChallenge new devices, countries and bot-like traffic5Monitor and reset fastReset accounts that succeeded during a burst
Defense in depth against credential stuffing. Illustration by Cysoro.
  • Require MFA, at least on risky logins. If you cannot require it for everyone, ask for a second factor on new devices, new locations, denylisted IPs, and scripted-looking traffic. Microsoft analysis cited by OWASP suggests MFA would have stopped 99.9 percent of account compromises.
  • Rate limit two ways. Apply a per-username limit and a per-IP limit independently. The per-username limit protects a targeted account from a distributed attack; the per-IP limit protects the service from a concentrated one.
  • Check passwords against breach data. When users set or change a password, reject any that appear in known breaches. You can test a password safely with our pwned password checker.
  • Use device and location risk. Fingerprint the device, compare the location and network with the account's history, and challenge logins that do not match. Do not rely on any single signal, because each one can be spoofed.
  • Do not use email addresses as usernames where you can avoid it. It makes account enumeration harder, because the attacker must guess both the identifier and the password.

For users, the advice is simpler and just as important: use a unique password for every service, turn on MFA, and use a password manager so reuse is not a habit. Our guide to how to know if your phone is hacked covers the account-check steps that also apply after a stuffed login succeeds.

What should I do when I detect an attack?

Act in minutes, not days. Block the sources, reset the accounts that succeeded, and tell the affected users to change any password they reused elsewhere.

  1. Block or challenge the sources. Rate limit, CAPTCHA, or block the offending IPs and address ranges. Expect the attacker to rotate to new proxies, so keep the global failure alert running.
  2. Reset every account that succeeded during the burst. Force a password reset, sign out all sessions, and remove unknown MFA devices and forwarding rules.
  3. Review those accounts for changes. Look for changed email addresses, phone numbers, payment details, and API keys. Treat any change made during the attack window as attacker activity.
  4. Notify affected users plainly. Tell them their account was accessed with a reused password, ask them to change that password everywhere they used it, and offer MFA enrollment.
  5. Record and report. Keep the logs, note the time window and the affected accounts, and report the incident through your normal channel. If money moved, involve your fraud team and, where required, law enforcement.
Do not punish the victims with a blanket lockoutA strict lockout after a few failures lets an attacker lock out hundreds of real users. Prefer step-up MFA and short, targeted blocks, and keep the login working for legitimate users.

The bottom line

Credential stuffing hides in plain sight because every attempt looks like a normal failed login. The pattern only appears when you count distinct usernames per source, watch the global failure rate, and follow up on the few successes.

Build those three counts into alerts, require MFA where it matters most, and reset fast when a burst succeeds. You can start by checking whether your own passwords already appear in known breaches with our free pwned password checker.

Frequently asked questions

What is credential stuffing?

Credential stuffing is an automated attack that takes username and password pairs stolen in a breach of one service and tries them on another service. It works because many people reuse the same password in several places, so a pair that worked elsewhere may work here too.

How is credential stuffing different from brute force?

Brute force guesses many passwords against one account. Credential stuffing tries real, stolen username and password pairs, usually once per account, across many accounts. Password spraying sits between them: one weak password tried against many accounts.

What is the first sign of a credential stuffing attack?

A sudden rise in failed logins spread across many different usernames, often from a small set of IP addresses, with a very low success rate. Individual failures look normal, so the signal only appears when you count failures per source and per time window.

Can multi-factor authentication stop credential stuffing?

Yes, it is the strongest single defense. Even when an attacker has the right password, they still need the second factor. OWASP calls MFA by far the best defense against most password attacks, including credential stuffing and password spraying.

Should I lock accounts after failed logins?

Use lockouts carefully. A strict lockout can let an attacker lock many real users out of their accounts, which is a denial of service. Prefer rate limits, CAPTCHA or step-up MFA after a few failures, and reserve lockouts for short, targeted blocks.

How do I check if my users passwords are in a breach?

Check new and changed passwords against a breached-password list, such as the Have I Been Pwned password service, and reject passwords that appear in known breaches. Never store or log the plain passwords you check, and use a hashed lookup where possible.

What should I do after a credential stuffing attack?

Force password resets for every account that logged in successfully during the attack window, review those accounts for changes such as new forwarding rules or payment details, block the offending sources, and tell affected users to change any reused password elsewhere.

Sources

  1. OWASP — Credential Stuffing Prevention Cheat Sheet
  2. MITRE ATT&CK — T1110.004 Credential Stuffing
  3. BleepingComputer — PayPal accounts breached in large-scale credential stuffing attack
  4. OWASP — Bot Management and Anti-Automation Cheat Sheet
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the OWASP Credential Stuffing Prevention Cheat Sheet and MITRE ATT&CK T1110.004.

How we write and fact-check →

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free