Security weakness
CWE-307 Missing brute-force protection
Your login accepts unlimited password guesses, so automated tools can keep trying until one works.
- Senior security engineers
- 540+ projects delivered
- Reply within one business day
Quick answer
What is 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.
Business impact
What CWE-307 could cost your business
MITRE documents what this weakness can do. Here is what that means for a website, store or app.
Access Control
Accounts and admin areas exposed
Logins and permission checks can be bypassed, putting admin and customer accounts at risk.
- Bypass Protection Mechanism
In plain English
What Missing brute-force protection means for your business
- 540+projects delivered
- 9+years in business
- 23+certified experts
A senior engineer replies within one business day.
A brute-force attack is simply guessing: software tries password after password until one is accepted. A related method, credential stuffing, tries username and password pairs leaked from other websites. Both depend on being allowed many attempts in a short time. This weakness means your login, or another place where a secret is checked, does not slow down, limit or block repeated failures.
Without limits, weak and reused passwords will eventually be found, and short codes are even easier. A six-digit verification code has only a million possibilities, which automated tools can work through quickly if nothing stops them. The business impact is account takeover: fraudulent orders, stolen loyalty points or saved payment methods, and compromised admin accounts. Login floods also load your server and can lock real customers out if lockout rules are poorly designed.
Where it shows up
- WordPress login pages and the XML-RPC interface, which accept repeated password attempts unless a plugin, firewall or host setting limits them.
- Customer account logins on stores and membership sites that never slow down or challenge a visitor after many failed attempts.
- One-time passcode, two-step verification and password reset code forms that allow unlimited guesses of a short numeric code before it expires.
- Mobile app and API login endpoints that skip the limits applied to the website form, along with gift card or coupon code checkers.
Free security check
Is CWE-307 hiding in your site?
A senior engineer checks your site, store or app for this weakness and the rest of the CWE Top 25, then sends a prioritized fix plan within one business day. No obligation.
Official definition
How MITRE defines 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.
Fix it
How to fix Missing brute-force protection
Practical steps in priority order. Share them with your developer or agency.
Throttle failed attempts
Limit failed logins per account and per IP address, and add a delay that grows with each failure. Apply the same limits to every authentication endpoint, including APIs, XML-RPC and mobile app logins.
Use temporary lockouts and challenges
After a set number of failures, lock the account briefly or require a CAPTCHA before further attempts. Prefer short, automatic unlocks over permanent locks, so attackers cannot shut real users out on purpose.
Require multi-factor authentication
Add a second factor, such as an authenticator app or passkey, for administrators and offer it to customers. A guessed or leaked password is then not enough to sign in.
Limit guesses on codes and resets
Allow only a few attempts per one-time code, expire codes within minutes and invalidate them after use. Rate limit password reset requests and gift card or coupon checks in the same way.
Block weak passwords and monitor
Reject common and previously breached passwords at signup and password change. Alert on spikes in failed logins, notify users of sign-ins from new devices, and use a web application firewall or bot protection.
Signs you may be affected
- Logs show large numbers of failed logins from a few addresses or against many usernames.
- You can enter a wrong password repeatedly and never see a delay, challenge or lockout.
- Customers report account takeovers or password reset emails they did not request.
Questions to ask your developer
- What happens after ten wrong password attempts on our login?
- Are the same limits applied to our API, mobile app and XML-RPC?
- How many guesses do we allow on one-time codes and reset links?
Prevention
What MITRE recommends, phase by phase
Every mitigation from the CWE entry, in the order a project runs: plan, build, test, operate.
- 01
Architecture and Design
- 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]
Detection and evidence
How CWE-307 is found, and where it has hit
The testing methods MITRE recommends, and real vulnerabilities this weakness has caused.
How it is detected
- Dynamic Analysis with Automated Results InterpretationAccording to SOAR [REF-1479], the following detection techniques may be useful: Web Application Scanner Web Services Scanner Database Scanners Host-based Vulnerability Scanners – Examine configuration for flaws, verifying that audit mechanisms work, ensure host configuration meets certain predefined.
- Dynamic Analysis with Manual Results InterpretationAccording to SOAR [REF-1479], the following detection techniques may be useful: Fuzz Tester Framework-based Fuzzer Forced Path Execution
- Manual Static Analysis – Source CodeAccording to SOAR [REF-1479], the following detection techniques may be useful: Focused Manual Spotcheck – Focused manual analysis of source Manual Source Code Review (not inspections)
- Automated Static Analysis – Source CodeAccording to SOAR [REF-1479], the following detection techniques may be useful: Source code Weakness Analyzer Context-configured Source Code Weakness Analyzer
- Automated Static AnalysisAccording to SOAR [REF-1479], the following detection techniques may be useful: Configuration Checker
Real vulnerabilities it caused
- CVE-2019-0039the REST API for a network OS has a high limit for number of connections, allowing brute force password guessing
- CVE-1999-1152Product does not disconnect or timeout after multiple failed logins.
- CVE-2001-1291Product does not disconnect or timeout after multiple failed logins.
- CVE-2001-0395Product does not disconnect or timeout after multiple failed logins.
- CVE-2001-1339Product does not disconnect or timeout after multiple failed logins.
- CVE-2002-0628Product does not disconnect or timeout after multiple failed logins.
How we fix it
From finding to fixed: how Codefreex closes CWE-307
- 01
Scan and confirm
We test your site, store or app for this weakness and the rest of the CWE Top 25 with automated scanning and manual review, and confirm what is actually exploitable.
- 02
Fix at the source
We change the code, configuration or dependency that causes it, not just the symptom, and plan the changes to avoid downtime.
- 03
Verify the fix
We retest every finding, check that nothing else broke and hand you a short report you can share with your team, client or auditor.
- 04
Keep it fixed
Updates, monitoring and maintenance so the weakness does not return with the next plugin, theme, app or code change.
Website SecurityPenetration TestingMalware Removal & Hack RepairWordPress Maintenance
Related weaknesses
Weaknesses related to CWE-307
FAQ
CWE-307: FAQs
Short answers for owners and developers. Not sure whether your site is affected? Ask us to check.
How serious is a login with no attempt limits?
It is a meaningful risk for any site with user accounts, and a high one for admin logins. Unlimited guessing lets attackers test leaked and common passwords at volume, which puts accounts with weak or reused passwords at real risk. The consequences are account takeover, fraud and support costs. The fix is inexpensive compared with the cost of cleaning up compromised accounts.
How do I prevent brute-force attacks?
Combine several layers. Limit and slow failed attempts per account and per address. Add temporary lockouts or a CAPTCHA after repeated failures. Require multi-factor authentication for privileged accounts. Block commonly used and breached passwords. Apply the same rules to every place a secret is checked, including APIs, one-time codes and password reset.
Can account lockouts be used against my customers?
Yes, if they are too strict. An attacker can deliberately fail logins to lock real users out, which is a denial of service. Avoid permanent locks that need support to clear. Use short, temporary lockouts, growing delays and challenges such as CAPTCHA, and track attempts by both account and source address to balance security with availability.
What is CWE-307?
CWE-307, “Improper Restriction of Excessive Authentication Attempts”, is a software weakness catalogued by MITRE in the Common Weakness Enumeration. The product does not implement sufficient measures to prevent multiple failed authentication attempts within a short time frame.
How serious is CWE-307?
It can affect access control, with impacts such as bypass protection mechanism. The real risk depends on where the weakness sits and what data or functions it exposes.
How do you prevent CWE-307?
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.
Can Codefreex check my site for CWE-307?
Yes. A senior engineer reviews your site, store or app for CWE-307 and the rest of the CWE Top 25, confirms what is exploitable and sends a prioritized fix plan within one business day. Start with the free security check form on this page.
Free security check
Find out if CWE-307 affects your site
Send your URL. A senior engineer checks for this weakness and the rest of the CWE Top 25, and replies within one business day with what to fix first.
- A senior strategist reviews your request, not a sales bot
- Clear scope, timeline and estimate within one business day
- Free 30-minute discovery call, no obligation
- NDA available on request
- Emailhello@codefreex.com
- CallUSA +1 (209) 375-3475 · India +91 790 3375 530
- Prefer to talk?Book a 30-minute call
Weakness data from the Common Weakness Enumeration (CWE®) version 5.0, Copyright © 2006–2026, The MITRE Corporation. CWE is free to use by any organization or individual for any research, development, and/or commercial purposes under the CWE Terms of Use. CWE is a registered trademark of The MITRE Corporation. The business impact, risk profile and plain-English guidance on this page are written by Codefreex and are general information, not a security assessment of your system.