# CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

**Likelihood of exploit:** Medium · **KEV-linked**

> As of 2026-10-05, CWE-367 (Time-of-check Time-of-use (TOCTOU) Race Condition) underlies 9 CVEs tracked by Threadlinqs, 2 of them in the CISA Known Exploited Vulnerabilities catalog, and is cited by 36 tracked threats. MITRE rates its likelihood of exploit as Medium.

**Last updated:** 2026-10-05

## What is CWE-367?

The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.

CWE-367 is a base-level weakness in MITRE’s Common Weakness Enumeration, with a MITRE likelihood of exploit of Medium. Applicable platforms: Language: Not Language-Specific.

_Source: [MITRE CWE](https://cwe.mitre.org/data/definitions/367.html) (CWE-367 definition, reproduced verbatim). Counts and linkage below are Threadlinqs data._

## Consequences

- **Integrity, Other** — Alter Execution Logic, Unexpected State. The attacker can gain access to otherwise unauthorized resources.
- **Integrity, Other** — Modify Application Data, Modify Files or Directories, Modify Memory, Other. Race conditions such as this kind may be employed to gain read or write access to resources which are not normally readable or writable by the user in question.
- **Integrity, Other** — Other. The resource in question, or other resources (through the corrupted one), may be changed in undesirable ways by a malicious user.
- **Non-Repudiation** — Hide Activities. If a file or other resource is written in this method, as opposed to in a valid way, logging of the activity may not occur.
- **Non-Repudiation, Other** — Other. In some cases it may be possible to delete files a malicious user might not otherwise have access to, such as log files.
- **Other** — Unexpected State. The product may perform invalid actions when the resource is in an unexpected state.

_Source: MITRE CWE, common consequences._

## How CWE-367 is exploited in the wild

Threadlinqs maps 9 CVEs to CWE-367, published between 2025-03-04 and 2026-10-04. 2 are listed in CISA’s Known Exploited Vulnerabilities catalog, the authoritative record of exploitation in the wild. By CVSS v3 severity the set splits into 2 critical, 4 high, 2 medium. The highest EPSS score in the set is 50.1% (CVE-2025-22224), the modelled probability of exploitation in the next 30 days. 36 tracked threats reference CWE-367 directly or through a CVE it covers; the most recent is “Multiple Vulnerabilities in Microsoft Edge prior to 154.0.4258.53 (HK GovCERT A26-10-03)” (2026-10-02). Affected products concentrate in Microsoft (2), FOSSBilling (1), N8n (1), among 8 vendors in total.

## Vulnerabilities (CVEs)

All 9 CVEs mapped to CWE-367, CISA KEV first, then by CVSS score.

- [CVE-2025-22224](https://intel.threadlinqs.com/cve/CVE-2025-22224) — CISA KEV · CVSS 9.3 critical · EPSS 50.1% · published 2025-03-04
- [CVE-2026-33825](https://intel.threadlinqs.com/cve/CVE-2026-33825) — CISA KEV · CVSS 7.8 high · EPSS 7.0% · published 2026-04-14
- [CVE-2026-25052](https://intel.threadlinqs.com/cve/CVE-2026-25052) — CVSS 9.9 critical · EPSS 0.0% · published 2026-02-04
- [CVE-2026-21523](https://intel.threadlinqs.com/cve/CVE-2026-21523) — CVSS 8 high · EPSS 0.0% · published 2026-02-10
- [CVE-2026-55391](https://intel.threadlinqs.com/cve/CVE-2026-55391) — CVSS 7.5 high · published 2026-07-28
- [CVE-2026-53410](https://intel.threadlinqs.com/cve/CVE-2026-53410) — CVSS 7 high · published 2026-07-16
- [CVE-2026-105163](https://intel.threadlinqs.com/cve/CVE-2026-105163) — CVSS 5.3 medium · published 2026-10-04
- [CVE-2026-13502](https://intel.threadlinqs.com/cve/CVE-2026-13502) — CVSS 4.5 medium · EPSS 0.0% · published 2026-06-28
- [CVE-2026-43927](https://intel.threadlinqs.com/cve/CVE-2026-43927) — EPSS 0.2% · published 2026-07-06

## Affected vendors

- [Microsoft](https://intel.threadlinqs.com/vendors/microsoft) — 2 CVEs
- [FOSSBilling](https://intel.threadlinqs.com/vendors/fossbilling) — 1 CVE
- [N8n](https://intel.threadlinqs.com/vendors/n8n) — 1 CVE
- [Vmware](https://intel.threadlinqs.com/vendors/vmware) — 1 CVE
- [Zoom Communications](https://intel.threadlinqs.com/vendors/zoom-communications) — 1 CVE
- **antlr** — 1 CVE
- **crossplane** — 1 CVE
- [koxudaxi](https://intel.threadlinqs.com/vendors/koxudaxi) — 1 CVE

## Threat activity

36 tracked threats cite CWE-367; the 25 most recent are listed.

- [Multiple Vulnerabilities in Microsoft Edge prior to 154.0.4258.53 (HK GovCERT A26-10-03)](https://intel.threadlinqs.com/threat/TL-2026-2838) — CRITICAL · 2026-10-02
- [Multiple High-Severity Vulnerabilities in TeamViewer Client (CVE-2026-92370, CVE-2026-92368, CVE-2026-92369, CVE-2026-92371, CVE-2026-19743)](https://intel.threadlinqs.com/threat/TL-2026-2905) — HIGH · 2026-10-02
- [Docker CopyEscape (CVE-2026-17106): docker cp / sbx cp flaw lets malicious containers overwrite host files](https://intel.threadlinqs.com/threat/TL-2026-2812) — HIGH · 2026-09-30
- [FalconFlank — CrowdStrike Falcon Sensor Local Privilege Escalation Zero-Day with Public PoC](https://intel.threadlinqs.com/threat/TL-2026-2350) — HIGH · 2026-09-06
- [Apache Tomcat 11.0.25 Fixes 11 Vulnerabilities Including HTTP/2 DoS, Authorization Bypass, and Auth Fail-Open Flaws — NVD Scores 5 of 11 CRITICAL/HIGH Despite Apache's Low/Moderate Ratings](https://intel.threadlinqs.com/threat/TL-2026-2159) — CRITICAL · 2026-08-26
- [Critical Type Confusion in isolated-vm (GHSA-864f-rcv7-6rh4) Enables Sandbox Escape and RCE on Host](https://intel.threadlinqs.com/threat/TL-2026-2121) — CRITICAL · 2026-08-23
- [Critical Type Confusion in isolated-vm ExternalCopy Enables Guest-to-Host Sandbox Escape and RCE (GHSA-864f-rcv7-6rh4)](https://intel.threadlinqs.com/threat/TL-2026-2084) — CRITICAL · 2026-08-20
- [NightmareEclipse Coordinated Disclosure Breach Campaign: 9+ Windows Zero-Days (CVE-2026-33825, CVE-2026-41091, CVE-2026-45498, CVE-2026-45585, CVE-2026-45586) Dumped Outside Responsible Disclosure and Weaponized in Real-World Intrusions](https://intel.threadlinqs.com/threat/TL-2026-1865) — CRITICAL · 2026-08-04
- [Multiple Vulnerabilities in Citrix XenServer 8.4 and 9 Enable Guest-to-Host Escalation and Denial of Service (CVE-2026-42492, CVE-2026-62428, CVE-2026-62431, CVE-2026-62432, CVE-2026-62434, CVE-2026-62435, CVE-2026-62436)](https://intel.threadlinqs.com/threat/TL-2026-1781) — HIGH · 2026-07-31
- [GitLab Patches 13 Security Flaws (incl. CVE-2026-6267, CVE-2026-12436) Enabling Data Exposure, CI/CD Tampering, and DoS](https://intel.threadlinqs.com/threat/TL-2026-1806) — HIGH · 2026-07-29
- [LegacyHive Exploitation Chain Bypasses Windows Security Even With July 2026 Patches Installed](https://intel.threadlinqs.com/threat/TL-2026-1742) — HIGH · 2026-07-28
- [Sen. Wyden Urges Binding Federal Mandate to Purge Internet-Facing Legacy VPNs for Zero-Trust Remote Access](https://intel.threadlinqs.com/threat/TL-2026-1774) — MEDIUM · 2026-07-27
- [RefluXFS: Linux Kernel XFS Copy-on-Write Race Condition Local Privilege Escalation (CVE-2026-64600)](https://intel.threadlinqs.com/threat/TL-2026-1629) — HIGH · 2026-07-22
- [CVE-2026-8933: Race Condition in Ubuntu snap-confine Enables Local Privilege Escalation to Root](https://intel.threadlinqs.com/threat/TL-2026-1633) — HIGH · 2026-07-22
- ["LegacyHive" Windows User Profile Service Zero-Day Allows Non-Admin Registry Hive Hijacking](https://intel.threadlinqs.com/threat/TL-2026-1585) — HIGH · 2026-07-21
- [Zoom Windows Apps Critical Unauthenticated Account Takeover (CVE-2026-53412) Plus Three Chained Local Privilege Escalation Flaws](https://intel.threadlinqs.com/threat/TL-2026-1393) — CRITICAL · 2026-07-16
- [Zoom Patches Critical Windows Client Flaw (CVE-2026-53412, CVSS 9.8) Enabling Unauthenticated Account Takeover](https://intel.threadlinqs.com/threat/TL-2026-1405) — CRITICAL · 2026-07-16
- [CVE-2026-53412: Unauthenticated Remote Account Takeover in Zoom Desktop Client, VDI Client, and Meeting SDK for Windows](https://intel.threadlinqs.com/threat/TL-2026-1407) — CRITICAL · 2026-07-16
- [LegacyHive: Windows 0-Day Allows Standard Users to Load Another User's Registry Hive via User Profile Service](https://intel.threadlinqs.com/threat/TL-2026-1351) — HIGH · 2026-07-15
- [LegacyHive: Unpatched Windows User Profile Service (profsvc) Registry Hive Hijack Privilege Escalation 0-Day PoC Released by Nightmare-Eclipse](https://intel.threadlinqs.com/threat/TL-2026-1373) — HIGH · 2026-07-15
- [Microsoft July 2026 Patch Tuesday: Record 622 CVEs Include Two Actively Exploited Zero-Days in AD FS (CVE-2026-56155) and SharePoint Server (CVE-2026-56164)](https://intel.threadlinqs.com/threat/TL-2026-1331) — CRITICAL · 2026-07-14
- [RoguePlanet: Microsoft Defender Elevation of Privilege Vulnerability (CVE-2026-50656) Patched](https://intel.threadlinqs.com/threat/TL-2026-1157) — HIGH · 2026-07-10
- [GNU Guix 'guix substitute' and 'guix pull' Vulnerabilities Enable Arbitrary File Write, Metadata Spoofing, Local Secret Disclosure, and Path Traversal (CVE Pending)](https://intel.threadlinqs.com/threat/TL-2026-1179) — HIGH · 2026-07-10
- [DirtyClone Linux Kernel Local Privilege Escalation via __pskb_copy_fclone() (CVE-2026-43503)](https://intel.threadlinqs.com/threat/TL-2026-0962) — HIGH · 2026-06-27
- [Node.js June 2026 Security Release — 12 Vulnerabilities Across 22.x/24.x/26.x Including Two High-Severity TLS Authentication Bypass and WebCrypto DoS Flaws (CVE-2026-48618, CVE-2026-48933)](https://intel.threadlinqs.com/threat/TL-2026-0866) — HIGH · 2026-06-19

## Mitigations

- **Implementation**: The most basic advice for TOCTOU vulnerabilities is to not perform a check before the use. This does not resolve the underlying issue of the execution of a function on a resource whose state and identity cannot be assured, but it does help to limit the false sense of security given by the check.
- **Implementation**: When the file being altered is owned by the current user and group, set the effective gid and uid to that of the current user and group when executing this statement.
- **Architecture and Design**: Limit the interleaving of operations on files from multiple processes.
- **Implementation, Architecture and Design**: If you cannot perform operations atomically and you must share access to the resource between multiple processes or threads, then try to limit the amount of time (CPU cycles) between the check and use of the resource. This will not fix the problem, but it could make it more difficult for an attack to succeed.
- **Implementation**: Recheck the resource after the use call to verify that the action was taken appropriately.
- **Architecture and Design**: Ensure that some environmental locking mechanism can be used to protect resources effectively.
- **Implementation**: Ensure that locking occurs before the check, as opposed to afterwards, such that the resource, as checked, is the same as it is when in use.

_Source: MITRE CWE, potential mitigations._

## Detection methods (MITRE CWE)

- **Automated Static Analysis** (effectiveness: High): 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.)

_Source: MITRE CWE, detection methods. Threadlinqs detection rules for the threats above are Blue tier and higher._

## Related weaknesses

- [CWE-362 Race Condition](https://intel.threadlinqs.com/cwe/CWE-362)

Canonical: https://intel.threadlinqs.com/cwe/CWE-367
Source definition: https://cwe.mitre.org/data/definitions/367.html
Detection rules and IOCs for threats exploiting CWE-367 via the Threadlinqs MCP server (Purple tier): https://intel.threadlinqs.com/mcp
