WSTG-v42-ATHN-03 / GUIDANCE
Testing for Weak Lock Out Mechanism
Account lockout mechanisms are used to mitigate brute force attacks. Some of the attacks that can be defeated by using lockout mechanism: - Login password or username guessing attack. - Code guessing on any 2FA functionality or Security Questions. Account lockout mechanisms require a balance between protecting accounts from unauthorized access and protecting users from being denied authorized access. Accounts are typically locked after 3 to 5 unsuccessful attempts and can only be unlocked after a predetermined period of time, via a self-service unlock mechanism, or intervention by an administrator. Despite it being easy to conduct brute force attacks, the result of a successful attack is dangerous as the attacker will have full access on the user account and with it all the functionality and services they have access to.
- Category
- OWASP Web
- Version / scope
- OWASP WSTG 4.2
- Affected / relevant technologies
- Web applications
- Evidence
- Documentation: pinned-source excerpt checked. Execution: not tested. Editorial: curated reference.
Defensive analysis and explicitly authorized assessment only. This website performs no scans, exploitation, model calls or infrastructure changes. Indicators below are investigation opportunities, not proof of compromise or guaranteed detectors.
Mechanism and prerequisites
Use only an explicitly authorized application scope and approved test identities. This excerpt describes objectives, not a test performed by the website.
Potential impact
The guide defines assessment objectives; a match does not itself establish a vulnerability or an affected local asset.
Versioned source scope
This record contains normalized, sometimes shortened source excerpts with editorial safety context. Markup and executable example blocks are omitted. Source-field verification does not establish device testing, a working detector or local applicability.
Publisher: OWASP. Release: OWASP WSTG 4.2. Source checked: 2026-11-18.
Source object: WSTG-v42-ATHN-03.
Attribution and source terms (OWASP contributors · CC BY-SA 4.0)Detection and investigation
- - Evaluate the account lockout mechanism's ability to mitigate brute force password guessing. - Evaluate the unlock mechanism's resistance to unauthorized account unlocking.
Preserve source timestamps, asset identity and collection context. Correlate independent evidence before attributing malicious intent. In OT, review passive evidence with the process owner; do not induce failures, replay commands or write to controllers to test a hypothesis.
Mitigation and response
- Apply account unlock mechanisms depending on the risk level. In order from lowest to highest assurance: 1. Time-based lockout and unlock. 2. Self-service unlock (sends unlock email to registered email address). 3. Manual administrator unlock. 4. Manual administrator unlock with positive user identification. Factors to consider when implementing an account lockout mechanism: 1. What is the risk of brute force password guessing against the application? 2. Is a CAPTCHA sufficient to mitigate this risk? 3. Is a client-side lockout mechanism being used (e.g., JavaScript)? (If so, disable the client-side code to test.) 4. Number of unsuccessful log in attempts before lockout. If the lockout threshold is to low then valid users may be locked out too often. If the lockout threshold is to high then the more attempts an attacker can make to brute force the account before it will be locked. Depending on the application's purpose, a range of 5 to 10 unsuccessful attempts is typical lockout threshold. 5. How will accounts be unlocked? 1. Manually by an administrator: this is the most secure lockout method, but may cause inconvenience to users and take up the administrator's "valuable" time. 1. Note that the administrator should also have a recovery method in case his account gets locked. 2. This unlock mechanism may lead to a denial-of-service attack if an attacker's goal is to lock the accounts of all users of the web application. 2. After a period of time: What is the lockout duration? Is this sufficient for the application being protected? E.g. a 5 to 30 minute lockout duration may be a good compromise between mitigating brute force attacks and inconveniencing valid users. 3. Via a self-service mechanism: As stated before, this self-service mechanism must be secure enough to […]
Apply changes through the asset owner's approved change and recovery process. Documentation review is separate from successful testing or verified production protection.
Related technical context
No protocol-specific mapping is asserted for this entry.
Related security reading
Continue directly to another reference. Editorial reading connections do not assert official CWE/CAPEC/ATT&CK/OWASP equivalence or mappings.
Authoritative sources and attribution
Identifiers and source titles belong to OWASP, MITRE, the CVE Program, CISA, NIST or the cited vendor. Source excerpts are attributed and adapted under the linked publisher license; editorial context is separate. This is not an official framework mirror. Review baseline: 2026-11-18. Live documents can change; check exact current applicability.
- Publisher reference: WSTG-v42-ATHN-03 — source accessed 2026-11-18
- document/4-Web_Application_Security_Testing/04-Authentication_Testing/03-Testing_for_Weak_Lock_Out_Mechanism.md — source accessed 2026-11-18
Source review supports bounded reference text. It is not execution evidence, a completeness claim, a CVSS assessment, a compliance certification or verification of production security.
