Join our Newsletter — 33% off our NHI Course
Authentication, Authorisation & Trust

CWE-307

← Back to Glossary
By NHI Mgmt Group Updated November 25, 2026 Domain: Authentication, Authorisation & Trust

CWE-307 is a weakness class for improper restriction of excessive authentication attempts. It describes systems that do not limit repeated logon guesses, password resets, or other challenge attempts, leaving them open to brute force and credential stuffing unless rate limiting, lockouts, throttling, or step-up controls are enforced.

What excessive authentication attempts mean

CWE-307 describes a failure to put meaningful limits on repeated authentication or challenge attempts. In practice, that means an attacker can keep guessing passwords, retrying password reset flows, or hammering another login challenge until the system accepts one. The weakness is not the guess itself, but the absence of restraint around the number, frequency, or cost of attempts.

This matters because authentication systems are often the first control protecting user accounts, administrative access, and sensitive workflows. When retry limits are missing or too weak, the application becomes easier to probe at scale, especially when the attacker can automate requests and vary usernames, passwords, or reset tokens across many attempts.

Why CWE-307 is dangerous

The main danger is that low-cost repetition turns an otherwise strong authentication control into a measurable exposure. Online guessing, credential stuffing, and scripted reset abuse all become more effective when the system gives repeated, consistent responses and does not slow down abuse. A login form that looks secure on paper can still be weak if it allows endless attempts.

Because the weakness affects authentication rather than a single credential type, it can show up in many places, including primary logon, password reset, one-time-code entry, recovery questions, and other verification steps. Attackers often look for the least protected path, so the failure may surface in whichever flow has the weakest attempt management.

For a deeper breakdown of how this weakness shows up in login and reset flows, see OWASP API Top 10 API2 Broken Authentication Guide.

How organisations assess exposure

Exposure assessment starts with inventorying every entry point that accepts repeated authentication attempts. That includes web logins, mobile apps, APIs, password reset endpoints, device enrollment, support-assisted recovery, and any step-up challenge that can be retried. The question is not only whether one login page has rate limiting, but whether the full authentication surface is consistently protected.

Teams should also check whether those flows are reachable from the internet, whether they sit behind shared gateways or reverse proxies, and whether upstream controls can actually see the attempt pattern. Vendor guidance matters here because controls are often split between application code, authentication infrastructure, and edge protections. A design that depends on one layer alone is fragile if that layer is bypassed or misconfigured.

For the broader weakness context and how it fits into weakness mapping, use the CWE Top 25 Guide and the CVE, CWE and CPE Guide.

Remediation and compensating controls

The core fix is to make repeated attempts expensive, bounded, or both. Common controls include rate limiting, progressive throttling, temporary lockouts, per-account and per-IP thresholds, step-up verification after suspicious volume, and challenge designs that distinguish real users from automation. The best control mix depends on the user population and the value of the protected action, but the underlying goal is always the same, stop unbounded retrying.

When a patch or code change cannot be deployed immediately, compensating controls can still reduce exposure. Edge rate controls, bot filtering, WAF rules, stricter reset policies, and tighter monitoring of repeated failures can all narrow the abuse window. The important point is to apply controls at every layer that can observe the attack pattern, not only inside the application.

For control design and secure authentication patterns, the NIST SP 800-53 Rev 5 Security and Privacy Controls and NIST SP 800-63 Digital Identity Guidelines are the most direct external references.

Detection and post-incident review

Detection should focus on repeated failure patterns that do not look human, such as bursts of login attempts, repeated reset requests, many usernames from one source, or a sudden rise in challenge failures across a small set of accounts. The useful signal is not just the total number of failures, but the shape of the activity over time and across identities.

After a suspected compromise, review whether the attacker succeeded through brute force, credential stuffing, or abuse of a reset flow, and then check for secondary effects such as account takeover, altered recovery settings, suspicious sessions, or changes to trusted devices. If the weakness was exploitable at scale, assume other accounts or workflows may also have been probed, even if only one account shows confirmed compromise.

For detection and adversary technique mapping, consult MITRE ATT&CK Enterprise Matrix. For authentication-focused API exposure, see OWASP API Security Top 10.

Risk and Threat Considerations

CWE-307 creates a direct abuse path for password guessing, credential stuffing, and automated reset abuse. The weakness is especially risky where the protected action is high value, where usernames are easy to enumerate, or where the system returns clear signals that help an attacker refine each attempt.

Failure mechanism: The application allows repeated attempts without strong enough throttling, lockout, or step-up friction, so automation can keep testing credentials or recovery challenges until one succeeds.

Impact: Successful abuse can lead to account takeover, unauthorized access to sensitive data or functions, and follow-on compromise of sessions, recovery settings, or linked accounts.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP ASVS, NIST SP 800-53 Rev 5 and NIST SP 800-63 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP ASVSV6 — AuthenticationCWE-307 weakens authentication by allowing repeated guesses and retries.
Recommendation — Require bounded attempts, lockout, and anti-automation checks for authentication flows.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementAttempt restriction protects authenticators from online guessing and abuse.
AC-7 — Unsuccessful Logon AttemptsThis weakness is the direct failure to limit unsuccessful authentication attempts.
IA-10 — Adaptive Identification and AuthenticationStep-up controls help raise friction when repeated attempts look suspicious.
Recommendation — Enforce retry limits and lockout logic around authenticators and recovery flows. Configure thresholds and lockouts for repeated unsuccessful logon activity. Apply adaptive step-up checks when repeated authentication attempts indicate elevated risk.
NIST SP 800-63Digital Identity GuidelinesThe guideline family addresses authenticators and protections against online guessing.
Recommendation — Follow digital identity guidance for rate limiting, throttling, and risk-based reauthentication.

Practitioner Guidance

What to watch for: Treat any authentication surface that can be retried cheaply as a control gap until proven otherwise. The most common misunderstanding is to secure the main login page while leaving password reset, MFA recovery, or API-based authentication paths easier to abuse than the primary sign-in flow.

Practitioner takeaway: For this weakness, the control is not just “strong passwords”, it is making repeated guessing operationally impractical across every authentication path.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org