1. CVE archive
  2. Vulnerability types
  3. CWE-366
CWE-366 · #397 most frequent type in the archive

Race Condition within a Thread

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.

Part of: CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization

11CVEs of this type in the archive
1critical (CVSS ≥ 9)
6high severity (7–8.9)
Sep 23, 2026latest published

What it is

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.

Impact on systems

ScopeImpact
Integrity, Other Alter Execution Logic, Unexpected State
The main problem is that -- if a lock is overcome -- data could be altered in a bad state.

How to prevent it

Architecture and Design Use locking functionality. This is the recommended solution. Implement some form of locking mechanism around code which alters or reads persistent data in a multithreaded environment.
Architecture and Design Create resource-locking validation checks. If no inherent locking mechanisms exist, use flags and signals to enforce your own blocking scheme when resources are being used by other threads of execution.

Source: MITRE CWE catalog · Official entry on the MITRE website

CWE-366 CVEs published per year

2026: year in progress, updated every hour

Show the data as a table
YearCVE
20233
20253
20265

All CWE-366 CVEs

11 results

Dottor Marc

Is this type of vulnerability in your systems?

An archive tells you what exists; a Vulnerability Assessment tells you what is exposed on your side. Dottor Marc tests your web applications and network with automated and manual checks.