Quick answer
Credential stuffing is an automated attack that tries username and password pairs stolen from one service on the login of another, relying on password reuse. Unlike brute force, it does not guess: each account is usually tried about once, so the sign is a jump in the login failure ratio.
Formula: Login failure ratio = failed logins ÷ login attempts
What is credential stuffing?
Credential stuffing is an automated attack that tries username and password pairs stolen from one service against the login of another. It works because people reuse passwords: if a pair leaked elsewhere is also valid on your site, the attacker gets in without guessing anything.
OWASP lists it as automated threat OAT-008 and defines it by mass login attempts used to verify the validity of stolen username and password pairs. The same entry separates it from credential cracking: stuffing involves no brute forcing or guessing, only testing credentials that were already used somewhere else. The pairs may come from an earlier breach, from a criminal marketplace or from public breach dumps; credential harvesting through fake login pages is another way such lists are filled.
Two consequences matter for defenders:
- A strong password does not help if the same password was exposed on another site.
- Most attempts fail, so the attack shows up mainly as a change in the mix of login traffic, not as one account being hammered.
Credential stuffing vs brute force vs password spraying
The OWASP Credential Stuffing Prevention Cheat Sheet separates three authentication attacks:
| Attack | What is tried (OWASP) | Accounts targeted | Attempts per account | Does a per-account lockout catch it? |
|---|---|---|---|---|
| Brute force | Multiple passwords against a single account | One or a few | Many | Usually yes |
| Credential stuffing | Username and password pairs from another site's breach | Very many | About one | Rarely |
| Password spraying | A single weak password against many accounts | Very many | One or very few | Rarely |
The last column is the practical difference. NIST SP 800-63B-4 requires verifiers to limit consecutive failed attempts on a single account to no more than 100. That protects against guessing one account's password. It does little against stuffing, where each account may see a single attempt. Controls have to look across accounts too.
Which signals show up in login traffic?
No single request proves anything. The evidence is in ratios compared with your own normal hours. Sample data for one login endpoint:
| Signal | Normal hour | Suspect hour | How to calculate it |
|---|---|---|---|
| Login attempts | 1,000 | 12,000 | count of submissions |
| Successful logins | 920 | 975 | count of successes |
| Failed logins | 80 | 11,025 | attempts − successes |
| Login failure ratio | 8.0% | 91.9% | failures ÷ attempts |
| Distinct usernames | 940 | 11,720 | unique submitted usernames |
| Attempts per username | 1.06 | 1.02 | attempts ÷ distinct usernames |
| Failures for usernames that do not exist | 12.5% | 63.6% | unknown-user failures ÷ failures |
| Login page views per attempt | 1.30 | 0.11 | page views ÷ attempts |
The most instructive row is successful logins. It moved from 920 to 975, about 6%, which no one would notice on a chart of sign-ins. Behind it, the failure ratio went from 8% to 92%. If the extra 11,000 attempts succeeded at 0.5% in this sample, that is 55 accounts taken over inside an hour that looks almost normal from the success side.
How to read the rest:
- Failure ratio up, attempts per username still near 1: many accounts tried once each, which points to stuffing or spraying rather than brute force.
- Many unknown usernames: the list being tried was not built from your user base.
- Attempts without page views: requests reach the login endpoint without loading the page that normally precedes it. Native apps and API clients do this legitimately, so compare like with like.
- Many source addresses, each quiet: OWASP warns that tooling can spread requests across large numbers of IP addresses, so per-address volume may stay low even in a large attack. Look at the total and at network types, such as hosting providers, not only at the busiest addresses.
Set alert thresholds from your own baseline for the same hour and weekday. A forgotten-password wave after an app update can also raise the failure ratio, but it usually keeps usernames known and page views attached.
How to defend against credential stuffing
OWASP calls multi-factor authentication by far the strongest defense against most password attacks, including this one. Everything else works best in layers.
| Defense | What it does | Limit | Cost to real users |
|---|---|---|---|
| Multi-factor authentication or passkeys | A leaked password alone is not enough | Needs enrolment and recovery paths | Medium; lower if required only on risk |
| Block compromised passwords | NIST SP 800-63B-4 requires checking new or changed passwords against a blocklist that includes compromised ones | Does not change passwords already set until you check them | Low |
| Rate limits across accounts and sources | Slows volume; see rate limiting | Distributed traffic stays under per-address limits | Low if limits are generous for normal use |
| Step-up challenge on risk | Extra factor or challenge for new device, unusual location or listed addresses | Challenges can be defeated; watch solve rates | Low for most, higher for some |
| Temporary address mitigation | Graduated blocking of abusive sources | Easy to sidestep; shared addresses cause false positives | Risk of locking out innocent users |
| Device and connection fingerprints | Spots mismatches between claimed and actual client | Client-supplied data can be spoofed; privacy review needed | Low |
| Notify account holders | Warns on a correct password that fails the second factor, shows recent logins | Too many notices get ignored | Low |
Two design rules from the same sources: keep mitigations temporary and removable, and have every control produce its own counts, so you notice when it stops working. Also return the same message and behave the same way for unknown users and wrong passwords, so the login form does not reveal which accounts exist.
What to do during and after an attack
- Tighten, do not shut the door. Raise challenge or step-up requirements for the risky traffic while ordinary users can still sign in.
- List the successes. Successful logins that came from the suspect sources or fit the suspect pattern are the priority, not the failures.
- Protect those accounts. End their sessions, require a password reset and a second factor, and review changes made after the login: email address, payout details, orders, stored cards.
- Tell the users what happened and what to change, including the reused password elsewhere.
- Keep the logs with timestamps, sources and outcomes. Account takeover may trigger breach notification duties; ask your legal or privacy lead which rules apply. This is not legal advice.
- Close the gap. Compare the signals table before and after, and keep the alert.
Take care when logging: record that a login failed and why, but never the submitted password.
How to watch login failures in TapCub
TapCub is an analytics and chat product. It does not sit in front of your login, block requests or detect credential stuffing for you, and it does not store IP addresses on events, so analysis by source address belongs in your server or firewall logs. It can chart and alert on the ratio.
- Send two events from your server.
login_succeededandlogin_failed, with areasonproperty such asunknown_userorbad_password. Do not put usernames, email addresses or passwords in properties. - Save the ratio. In All-platform analytics › Behavior › Metrics & SQL, create a formula metric: failed events ÷ (failed + succeeded) × 100, formatted as a percentage.
- Alert on it. In All-platform analytics › Operations › Monitors (Pro plan or above), add a rule on that saved metric at the hour grain, either a fixed threshold above your normal range or an anomaly condition once about 30 days of history exist. A dry run shows how often it would have fired.
- Break it down. In All-platform analytics › Behavior › Event analysis, split
login_failedbyreason: a jump inunknown_useris the pattern in the table above. - Hand over. When the rule fires, the investigation moves to your server logs and your login controls; mark the date in Configuration › Annotations with type Incident.
Sources
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Technical Engineer
Focuses on tracking code, SDKs, and API integrations, with practical guidance on implementation checks and troubleshooting.