Credential stuffing is an automated attack in which username and password pairs leaked from one service are tried against the login pages of other services. It works because many people reuse the same password in several places. Unlike classic brute force, the attacker does not guess passwords but tests real credentials, often spread across many IP addresses so that each source sends only a few attempts. The goal is account takeover.
What is credential stuffing?
Credential stuffing is the automated reuse of stolen credentials. Attackers take lists of usernames and passwords from earlier data breaches, often combined into large collections, and test them against the login of another website, API or app. Every pair that works gives them an account they can take over, sell or abuse for fraud.
The attack exploits one human habit: password reuse. If someone uses the same email address and password for a forum that was breached and for an online shop, the shop account is at risk even though the shop itself was never hacked. MITRE ATT&CK lists credential stuffing as sub-technique T1110.004 of Brute Force, and the OWASP Automated Threats to Web Applications project lists it as OAT-008.
How an attack works
- Collecting credentials: the attacker obtains combo lists of email addresses or usernames with passwords from breaches or from infostealer malware.
- Choosing targets: login pages, mobile app APIs and single sign-on endpoints of services where accounts have value, for example shops, streaming, banking or SaaS tools.
- Automation: tools or scripts send login requests at scale, often through proxy networks or residential IP addresses and with realistic user agents to look like normal users.
- Validation: successful logins are recorded. Responses that differ for "unknown user" and "wrong password" help the attacker sort the list.
- Monetisation: stored payment methods, loyalty points, personal data or access to company systems are abused, or the accounts are resold.
Credential stuffing, brute force and password spraying
| Attack | Input | Pattern | Typical signal |
|---|---|---|---|
| Brute force | Many guessed passwords for one account | Many attempts per account | Failed logins pile up on one username, often from one source |
| Password spraying | A few common passwords for many accounts | Few attempts per account, many accounts | Same password tried across many usernames, often slowly |
| Credential stuffing | Real leaked username and password pairs | Usually one attempt per account, very many accounts | High share of failed logins and unknown usernames, spread over many IPs |
The difference matters for detection. A rule that counts failed logins per account catches brute force but hardly sees credential stuffing, because each account is tried only once or twice.
Signals in logs and metrics
- The login failure rate rises sharply compared with the normal baseline for that time of day.
- A high share of attempts uses usernames that do not exist in your system.
- Requests come from many different IP addresses, autonomous systems or countries, each with only a few attempts.
- Login traffic hits the API directly without the usual page loads before it, or with identical headers and user agents.
- After successful logins, accounts show unusual follow-up actions: changed email address or password, new payment method, exported data, new devices.
- Sign-ins come from a new country or at an unusual hour for the account.
A simple query over structured authentication logs can make the pattern visible:
event.name = "user.login"
| stats count() as attempts,
count_if(outcome = "failure") as failures,
count_distinct(user.name) as accounts,
count_distinct(source.ip) as ips
by bin(timestamp, 5m)
| where failures / attempts > 0.5 and accounts > 200
The thresholds are examples. They depend on your traffic and should be compared with normal days to keep false positives manageable.
Defences
- Multi-factor authentication: a valid password alone is no longer enough. Phishing-resistant methods such as passkeys or FIDO2 security keys offer the strongest protection.
- Checking for breached passwords: NIST SP 800-63B recommends comparing new passwords against lists of known compromised passwords. Services such as Pwned Passwords allow this without sending the full password.
- Rate limiting per IP, per account and per device fingerprint, combined with progressive delays.
- Bot detection and challenges: CAPTCHAs or other challenges when traffic looks automated, ideally only in suspicious cases.
- Uniform error messages: do not reveal whether the username or the password was wrong.
- Notifications: tell users about logins from new devices and about changes to email, password or payment data.
- Protecting all entry points: mobile APIs, legacy endpoints and password reset flows are often weaker than the main login form.
Common mistakes
- Only counting failures per IP. Distributed attacks stay below every per-IP threshold.
- Not logging failed logins or logging them without username, source address and outcome, which makes later analysis impossible.
- Logging passwords. Failed login attempts sometimes end up in logs with the entered password, which creates a new data leak. Mask sensitive fields at ingest.
- Treating it as a pure IT topic. Account takeover is also a fraud and customer support problem, and those teams often see the effects first.
- Forgetting service accounts and admin logins, which are often exempt from MFA.
Responding to an attack in progress
When a spike is detected, speed matters more than perfection. Tighten rate limits or challenges on the affected endpoint, and, if you use a CDN or WAF, add temporary rules for the most active sources. In parallel, list accounts with a successful login during the attack window and force a password reset or a step-up authentication for them. Check those accounts for changes to email addresses, payment data and API keys. Afterwards, compare the attacked usernames with your user base: a high share of real accounts suggests the list came from a breach of a service with an overlapping audience.
The observability perspective
Credential stuffing is rarely visible in a single event; it shows in aggregates. Login rate, failure ratio, share of unknown usernames and number of distinct source addresses are metrics like any other and can be tracked against a baseline. Structured authentication logs with consistent fields, such as user, source IP, user agent and outcome, allow you to correlate a spike with the accounts that were successfully accessed during it. Traces show which endpoints the traffic hit and whether it bypassed the normal user flow. Combined in a SIEM, these signals can feed an incident response process that resets affected accounts quickly.
How Obseria helps
Obseria detects; it does not block logins, manage bots or act as an identity provider. Cloud SIEM reads authentication logs such as SSH, identity provider and application logins and includes ready-made rules for brute force, a successful login after brute force and sign-ins from a new country or at an unusual hour. Findings add up risk per IP address, host and user, so several weak signals around one account can lead to one alert. Because distributed credential stuffing can stay below per-source rules, you can add your own alert rules on thresholds or patterns, for example on the login failure ratio. The Security Investigator helps you find which accounts logged in successfully during a spike, and Security Log Analytics can mask personal data at ingest. For access to Obseria itself, access control and SSO connect your company login.