Credential stuffing is the automated testing of username and password pairs stolen from another service. Effective protection combines multi-factor authentication, password and account safeguards, rate controls, traffic intelligence, anomaly detection, and monitoring. IP blocking alone is not sufficient because attackers can distribute low-volume attempts across large proxy networks.

Credential stuffing is not ordinary brute force

Brute force tries many candidate passwords against one account. Password spraying tries a small set of common passwords across many accounts. Credential stuffing tests previously exposed username and password pairs because people often reuse credentials between services. The request may use the correct password, so a simple failed-login threshold cannot detect every compromised account.

Why one IP limit fails

Per-IP limits stop simple high-volume attacks, but distributed credential stuffing can keep each address below the threshold. Shared networks also place many legitimate users behind one address, so an aggressive fixed limit may block real customers. OWASP recommends graduated mitigation informed by multiple scenarios, short and long time windows, network classification, and geolocation rather than a single predictable counter.

  • Track attempts per IP, subnet, account, device, session, and credential pair where privacy and policy permit.
  • Look for one address testing many accounts and one account receiving attempts from many addresses.
  • Use both burst windows and longer windows to detect slow distributed activity.
  • Treat hosting, proxy, anonymization, and unusual geography as context, not automatic proof.
  • Expire temporary network mitigations when abusive behavior declines.

Layer 1: strengthen authentication

Multi-factor authentication is the strongest general defense because a reused password alone is no longer enough. Prefer phishing-resistant options where possible, require MFA for administrators and privileged roles, and consider step-up authentication when risk signals change. Check new passwords against known-compromised password data and avoid security questions that act as another reusable secret.

Layer 2: control request and account velocity

Rate controls should protect both infrastructure and accounts. Use limits that account for route sensitivity and combine them with progressive delays or temporary account protections. Do not reveal whether the username or password was incorrect, and keep response timing and messages consistent enough to reduce account enumeration.

  • Limit repeated login attempts across several dimensions, not only IP.
  • Detect broad username enumeration before password testing becomes visible.
  • Apply tighter controls to administrator and high-value accounts.
  • Protect password reset, verification, and recovery endpoints as part of the same attack surface.
  • Use challenges selectively when risk rises instead of challenging every login.

Layer 3: add traffic and device context

Network and client context can raise or lower confidence. Relevant signals include IP reputation, network owner, hosting classification, geolocation, hostname, user-agent consistency, device history, header patterns, and whether the source attempts many accounts. Client-supplied attributes can be spoofed, so they should support a decision rather than become a single source of truth.

Stopbot can provide bot classification, IP and network context, customer-configured access decisions, URL threat status, and a decision reason before the login handler proceeds. That information can help reject or scrutinize suspicious traffic, but it does not replace MFA, account-level rate limits, password controls, or post-login monitoring.

Layer 4: detect successful compromise

Pre-login defenses will not catch every valid stolen credential. Monitor successful logins from new devices, impossible travel patterns, rapid account changes, payment or payout updates, token creation, and unusual data access. Notify users about meaningful security events and provide a safe way to terminate sessions and recover the account.

Operational metrics for credential stuffing

  • Login attempts, failures, and successes by account, network, device, and time window.
  • Distinct accounts attempted per source and distinct sources observed per account.
  • MFA enrollment, challenge, completion, and recovery rates.
  • Blocked, challenged, delayed, and allowed traffic with the associated reason.
  • Confirmed account takeovers, false-positive support cases, and time to remediation.
  • Latency and availability added by every protection layer.

Sources

Continue building

Put the decision fields into practice.

Review the current API documentation before changing production traffic handling.