CWE-366: Race Condition within a Thread

low-risk

If two threads of execution use a resource simultaneously, there exists the possibility that resources may be used while invalid, in turn making the state of execution undefined.

Abstraction: Base

Common Consequences

Integrity Alter Execution Logic

Detection Methods

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Real-World Examples (10)

CVE CVSS EPSS KEV
CVE-2024-6778 7.5 12.8%
CVE-2021-26569 9.8 1.8%
CVE-2015-10067 4.6 0.4%
CVE-2023-6546 7.0 0.3%
CVE-2020-1629 5.9 0.3%
CVE-2023-4127 5.9 0.1%
CVE-2022-1729 7.0 0.1%
CVE-2025-58143 9.8 0.1%
CVE-2023-3218 4.4 0.0%
CVE-2024-2032 3.1 0.0%
2
/ 100
low-risk
Active Threat 2/50 · Minimal
Exploit Availability 0/50 · Minimal