CWE-412: Unrestricted Externally Accessible Lock
4 CVEs have CWE-412 as their primary weakness. 0 of them are in the CISA KEV catalog. The highest EPSS score among them is 1.040%.
The product properly checks for the existence of a lock, but the lock can be externally controlled or influenced by an actor that is outside of the intended sphere of control.
This prevents the product from acting on associated resources or performing other behaviors that are controlled by the presence of the lock. Relevant locks might include an exclusive lock or mutex, or modifying a shared resource that is treated as a lock. If the lock can be held for an indefinite period of time, then the denial of service could be permanent.
Child of CWE-667: Improper Locking
Mitigations
- Architecture and Design Implementation: Use any access control that is offered by the functionality that is offering the lock.
- Architecture and Design Implementation: Use unpredictable names or identifiers for the locks. This might not always be possible or feasible.
- Architecture and Design: Consider modifying your code to use non-blocking synchronization methods.
Observed examples
- CVE-2001-0682: Program can not execute when attacker obtains a mutex.
- CVE-2002-1914: Program can not execute when attacker obtains a lock on a critical output file.
- CVE-2002-1915: Program can not execute when attacker obtains a lock on a critical output file.
- CVE-2002-0051: Critical file can be opened with exclusive read access by user, preventing application of security policy. Possibly related to improper permissions, large-window race condition.
- CVE-2000-0338: Chain: predictable file names used for locking, allowing attacker to create the lock beforehand. Resultant from permissions and randomness.
- CVE-2000-1198: Chain: Lock files with predictable names. Resultant from randomness.
- CVE-2002-1869: Product does not check if it can write to a log file, allowing attackers to avoid logging by accessing the file using an exclusive lock. Overlaps unchecked error condition. This is not quite CWE-412, but close.
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cwe_lookup/CWE-412'curl 'https://api.contrastcyber.com/cve_search?cwe_id=CWE-412'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).