Authentication failures: where rate limits help and where they stop

Authentication failures let an attacker pass as a legitimate user, through stolen or guessed credentials or a session that should have ended. The category is A07 in the OWASP Top 10:2025. The automated part of it, many sign-in attempts, shows up as rate and pattern, which limits and a filter can reach. Password storage, multi-factor authentication and sessions stay in the application.

Section Rules Updated OWASP A07:2025

Quick facts

Category
A07:2025 Authentication Failures, renamed from Identification and Authentication Failures
Mapped weaknesses
36 CWEs, among them CWE-287 improper authentication, CWE-384 session fixation and CWE-798 hard-coded credentials
Automated attacks named
Credential stuffing, hybrid password spraying and brute force
Where it lives
Sign-in, recovery, password storage, multi-factor authentication and session handling
Does a WAF stop it?
Partly. The rate and pattern of sign-in attempts can be limited; how passwords, factors and sessions are handled cannot

Figures are from the A07:2025 page of the OWASP Top 10.

What the category covers

OWASP describes the category as any way an attacker can make a system accept the wrong user as legitimate.

  • Automated sign-in attacks. Credential stuffing and password spraying with variations of leaked credentials, and brute force that is not stopped quickly.
  • Weak or known passwords allowed. Including defaults, well-known passwords and passwords already found in breaches.
  • Weak recovery. Knowledge-based answers that others can find or guess.
  • Weak password storage. Plaintext, reversible encryption or fast hashes.
  • Missing or weak multi-factor authentication. Including fallbacks that bypass it.
  • Session flaws. Identifiers in URLs, identifiers reused after sign-in, sessions and tokens not ended at logout or after inactivity; see session hijacking.
  • Credentials accepted for the wrong audience. A token whose scope and intended recipient are not checked.
  • Weakly checked JSON Web Tokens. A JSON Web Token (JWT, RFC 7519) is a compact format for claims such as the user, the issuer and an expiry time. When the application skips or misreads the signature, algorithm, expiry or audience, a forged token is accepted.

From broken authentication to authentication failures

In 2017 the category was A2 Broken Authentication. In 2021 it was renamed A07 Identification and Authentication Failures and slid from second to seventh place, taking in weaknesses in how users are identified. In the 2025 edition it keeps seventh place as Authentication Failures.

Older reports, tools and job descriptions still use broken authentication. It covers the same ground: weak or reused passwords allowed, credential stuffing left unchecked, missing multi-factor authentication, and sessions handled badly, which has its own page on session hijacking.

What it looks like in a request

A single sign-in attempt with a stolen password is indistinguishable from the owner signing in. What gives automation away is the aggregate: many attempts, many accounts, the same sources, failures at a rate no person produces. Two failures from this category have pages of their own: user enumeration and session fixation.

OWASP's first scenario describes exactly that. Attackers take breached credentials, adjust them the way people adjust their own passwords, and try them at scale; an application with no defence answers each attempt and becomes an oracle for which guesses work. Credential stuffing covers the attack from the automation side.

Bearer authentication sends a token in the Authorization header (RFC 6750); a JWT is one such format, readable but signed.

The rest of the category leaves nothing in the request. A session that was never ended at logout, or a password stored with a fast hash, is a property of the application.

Two neighbouring categories split what a request carries from what it does not in the same way: cryptographic failures leave no trace in a request, and in the integrity category, insecure deserialization is the best-known case of trusting data that was never checked.

WHAT A FILTER HAS TO WORK WITH IN THE REQUEST IN THE RATE FIXED ONLY IN THE CODE CREDENTIAL STUFFING BRUTE FORCE AND SPRAYING WEAK PASSWORD ALLOWED SESSION NOT ENDED AT LOGOUT MISSING SECOND FACTOR // limits slow the first two rows and never touch the last three
// five failures: two show in the rate, three only in the code

What limits and a filter can do

  • Slow automated attempts. OWASP itself recommends throttling or progressively delaying failed sign-ins, without turning that into a way to lock out real users.
  • Count by more than one subject. Many attempts from one place are caught by counting the source; one attempt each from many places is caught by counting the account being tried.
  • Keep a record. Logging failed attempts and alerting on a suspected attack is part of OWASP's guidance, and a filter's log is one of those records.
  • Reach token replay. A leaked token replayed at volume shows up as rate like any other attempt, and limits apply to it. A limit cannot tell a genuine token from a forged one.
  • Stop at the boundary of the session. Once credentials are accepted, a filter sees an authenticated user making ordinary requests.

Choosing the subject of a limit covers the trade between counting by address and by account in detail.

What fixes it

  • Multi-factor authentication. OWASP's first measure, and the one that blunts stuffing, brute force and reused credentials together.
  • Better passwords without arbitrary rules. Check new passwords against the worst-passwords list and known breaches, follow NIST SP 800-63B on length and complexity, and do not force periodic rotation.
  • No default credentials. Especially for administrators.
  • Identical responses. Registration, recovery and sign-in answer the same way whatever the outcome, so accounts cannot be enumerated.
  • A proven session manager. New high-entropy identifiers after sign-in, kept out of URLs, in secure cookies, ended at logout and after idle and absolute timeouts.
  • Checked token audience. Validate issuer, audience and scope on every token.
  • Verified signature, fixed algorithm. Verify the signature on every token and accept only the algorithms the server has chosen, not the one the token names. Refuse unsigned tokens (alg none) by default; RFC 8725 sets this out.
  • Strong keys, short lifetimes. A guessable signing secret lets anyone mint tokens. Set an expiry (the exp claim) and reject tokens past it. A token checked only by its signature stays valid until then, so give logout a server-side way to end it.

Phishing-resistant multi-factor authentication

Not every second factor is equal. Codes sent by text message or typed from an app can be phished: a fake sign-in page asks for the code and passes it on within seconds. Factors based on WebAuthn, such as passkeys and security keys, bind the sign-in to the real site's address, so a lookalike site receives nothing it can use.

Any second factor stops most credential stuffing and password spraying. Phishing-resistant ones also stop the attacks aimed at people rather than at passwords, which is why they are worth requiring for administrators and staff with access to money or data first.

Questions

What are authentication failures?

Weaknesses that let an attacker pass as a legitimate user or keep a session that should have ended. OWASP lists them as A07:2025.

Are authentication failures the same as broken authentication?

Yes, in scope. Broken authentication was the 2017 name; the category was renamed in 2021 and again in 2025.

Can a WAF stop credential stuffing?

Partly. Credential stuffing shows up as many sign-in attempts, which rate limits and a filter can slow and refuse. A single attempt with a correct stolen password looks like the owner, so multi-factor authentication is what stops the rest.

What changed for authentication in the OWASP Top 10:2025?

The category was renamed from Identification and Authentication Failures to Authentication Failures and is A07:2025.

Should I lock accounts after failed sign-ins?

Carefully. OWASP recommends throttling or progressively delaying failed attempts without creating a denial of service, because a hard lockout lets anyone lock out a real user deliberately.

What is a JWT, and why does it appear under authentication failures?

A JSON Web Token is a compact, URL-safe format for claims, defined in RFC 7519. It becomes an authentication failure when the application accepts a token it should have refused: unsigned, expired, or issued for another audience.

Can a WAF verify a JWT?

Not as a filter on rate and pattern. The signature, expiry, issuer and audience are checked by the application or the service that issued the token. Limits can slow and record repeated attempts.