CWE-307: Improper Restriction of Excessive Authentication Attempts
The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame.
Last updated
Overview
CWE-307 (Improper Restriction of Excessive Authentication Attempts) is a base-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
Real-world CVEs
629 recorded CVEs are caused by CWE-307 (Improper Restriction of Excessive Authentication Attempts). The highest-severity and most recent are shown first. 179 new CWE-307 CVEs have been recorded so far in 2026 (94 in 2025).
- CVE-2026-76779Critical · CVSS 9.8 · EPSS 18th2026-10-09
- CVE-2026-56592
HCL BigFix Service Management is affected by multiple security vulnerabilities.
Critical · CVSS 9.8 · EPSS 20th2026-09-18 - CVE-2026-44596
Yamcs: No Rate Limiting on Authentication Endpoint
Critical · CVSS 9.8 · EPSS 81th2026-07-16 - CVE-2026-6853
OTP Bypass in Başbelen Group's Pause+ Mobile App
Critical · CVSS 9.8 · EPSS 50th2026-06-12 - CVE-2026-8760
Login with OTP <= 1.6 - Unauthenticated Authentication Bypass via OTP Brute Force
Critical · CVSS 9.8 · EPSS 64th2026-05-27 - CVE-2026-43914
Vaultwarden: Brute-force protection bypass vulnerability
Critical · CVSS 9.8 · EPSS 41th2026-05-11 - CVE-2025-31991
HCL DevOps Velocity is susceptible to brute-force attacks
Critical · CVSS 9.8 · EPSS 13th2026-04-13 - CVE-2026-22278Critical · CVSS 9.8 · EPSS 33th2026-01-22
- CVE-2025-12995Critical · CVSS 9.8 · EPSS 25th2025-12-04
- CVE-2025-56221Critical · CVSS 9.8 · EPSS 47th2025-10-17
- CVE-2025-58587
Improper Restriction of Excessive Authentication Attempts
Critical · CVSS 9.8 · EPSS 41th2025-10-06 - CVE-2025-1740
Authentication Bypass in Akinsoft's MyRezzta
Critical · CVSS 9.8 · EPSS 38th2025-09-03
Showing 12 of 629 recorded CWE-307 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor CWE-307 vulnerabilitiesCommon consequences
What can happen when CWE-307 is exploited.
Bypass Protection Mechanism
Affects: Access Control
An attacker could perform an arbitrary number of authentication attempts using different passwords, and eventually gain access to the targeted account using a brute force attack.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
How to prevent it
Practical mitigations for CWE-307, grouped by where in the lifecycle they apply.
Common protection mechanisms include:
- Disconnecting the user after a small number of failed attempts
- Implementing a timeout
- Locking out a targeted account
- Requiring a computational task on the user's part.
Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
Consider using libraries with authentication capabilities such as OpenSSL or the ESAPI Authenticator. [REF-45]
How to detect it
Dynamic Analysis with Automated Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: High
Dynamic Analysis with Manual Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: High
Manual Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: High
Automated Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: SOAR Partial
Automated Static Analysis
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: SOAR Partial
Architecture or Design Review
According to SOAR [REF-1479], the following detection techniques may be useful:
Effectiveness: High
Code examples
MITRE examples of the weakness in code.
In January 2009, an attacker was able to gain administrator access to a Twitter server because the server did not restrict the number of login attempts [REF-236]. The attacker targeted a member of Twitter's support team and was able to successfully guess the member's password using a brute force attack by guessing a large number of common words. After gaining access as the member of the support staff, the attacker used the administrator panel to gain access to 33 accounts that belonged to celebrities and politicians. Ultimately, fake Twitter messages were sent that appeared to come from the compromised accounts.
The following code, extracted from a servlet's doPost() method, performs an authentication lookup every time the servlet is invoked.
Vulnerable example
String username = request.getParameter("username");However, the software makes no attempt to restrict excessive authentication attempts.
This code attempts to limit the number of login attempts by causing the process to sleep before completing the authentication.
Vulnerable example
$username = $_POST['username'];However, there is no limit on parallel connections, so this does not increase the amount of time an attacker needs to complete an attack.
In the following C/C++ example the validateUser method opens a socket connection, reads a username and password from the socket and attempts to authenticate the username and password.
Vulnerable example
int validateUser(char *host, int port)Safe example
int validateUser(char *host, int port)The validateUser method will continuously check for a valid username and password without any restriction on the number of authentication attempts made. The method should limit the number of authentication attempts made to prevent brute force attacks as in the following example code.
Consider this example from a real-world attack against the iPhone [REF-1218]. An attacker can use brute force methods; each time there is a failed guess, the attacker quickly cuts the power before the failed entry is recorded, effectively bypassing the intended limit on the number of failed authentication attempts. Note that this attack requires removal of the cell phone battery and connecting directly to the phone's power source, and the brute force attack is still time-consuming.
Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- CVE-2019-0039 — the REST API for a network OS has a high limit for number of connections, allowing brute force password guessing
- CVE-1999-1152 — Product does not disconnect or timeout after multiple failed logins.
- CVE-2001-1291 — Product does not disconnect or timeout after multiple failed logins.
- CVE-2001-0395 — Product does not disconnect or timeout after multiple failed logins.
- CVE-2001-1339 — Product does not disconnect or timeout after multiple failed logins.
- CVE-2002-0628 — Product does not disconnect or timeout after multiple failed logins.
- CVE-1999-1324 — User accounts not disabled when they exceed a threshold; possibly a resultant problem.
Terminology & mappings
Mapped taxonomies
- PLOVER: Multiple Failed Authentication Attempts not Prevented (AUTHENT.MULTFAIL)
- Software Fault Patterns: Unrestricted authentication (SFP34)
Attack patterns
CAPEC attack patterns that exploit this weakness.
Frequently asked questions
Common questions about CWE-307.
- What is CWE-307?
- The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame.
- What CVEs are caused by CWE-307?
- 629 recorded CVEs are attributed to CWE-307, including CVE-2026-76779, CVE-2026-56592, CVE-2026-44596.
- How do you prevent CWE-307?
- Common protection mechanisms include:
- How is CWE-307 detected?
- Dynamic Analysis with Automated Results Interpretation: According to SOAR [REF-1479], the following detection techniques may be useful:
- What are the consequences of CWE-307?
- Exploiting CWE-307 can lead to: Bypass Protection Mechanism.
- Is CWE-307 actively exploited?
- 629 recorded CVEs are caused by CWE-307; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-307) (opens in a new tab)
- CWE-307 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Track CWE-307 CVEs
Get an alert when a new CWE-307 CVE affects your products, with AI-written analysis and remediation steps.