Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CWE-367 (检查时间与使用时间(TOCTOU)的竞争条件) — Vulnerability Class 325

325 vulnerabilities classified as CWE-367 (检查时间与使用时间(TOCTOU)的竞争条件). AI Chinese analysis included.

CWE-367 represents a logic flaw where a system verifies a resource’s state before accessing it, allowing the state to change maliciously between the verification and actual usage. Attackers typically exploit this race condition by manipulating the resource, such as swapping a file or altering permissions, during the narrow window between the check and the use. This enables unauthorized access or privilege escalation, as the application proceeds based on outdated, validated assumptions. To mitigate this vulnerability, developers must ensure atomic operations, ensuring that the check and use occur simultaneously without interruption. Implementing robust locking mechanisms, utilizing secure system calls that combine verification and access, or adopting file descriptor-based approaches can effectively prevent state changes, thereby eliminating the race condition and securing the resource against temporal manipulation.

MITRE CWE Description
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.
Common Consequences (6)
Integrity, OtherAlter Execution Logic, Unexpected State
The attacker can gain access to otherwise unauthorized resources.
Integrity, OtherModify 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, OtherOther
The resource in question, or other resources (through the corrupted one), may be changed in undesirable ways by a malicious user.
Non-RepudiationHide 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, OtherOther
In some cases it may be possible to delete files a malicious user might not otherwise have access to, such as log files.
Mitigations (5)
ImplementationThe 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.
ImplementationWhen 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 DesignLimit the interleaving of operations on files from multiple processes.
Implementation, Architecture and DesignIf 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.
ImplementationRecheck the resource after the use call to verify that the action was taken appropriately.
Examples (2)
The following code checks a file, then updates its contents.
struct stat *sb; ... lstat("...",sb); // it has not been updated since the last time it was read printf("stated file\n"); if (sb->st_mtimespec==...){ print("Now updating things\n"); updateThings(); }
Bad · C
The following code is from a program installed setuid root. The program performs certain file operations on behalf of non-privileged users, and uses access checks to ensure that it does not use its root privileges to perform operations that should otherwise be unavailable the current user. The program uses the access() system call to check if the person running the program has permission to access…
if(!access(file,W_OK)) { f = fopen(file,"w+"); operate(f); ... } else { fprintf(stderr,"Unable to open file %s.\n",file); }
Bad · C
CVE IDTitleCVSSSeverityPublished
CVE-2026-42344 FastGPT: DNS rebinding TOCTOU bypass in isInternalAddress allows SSRF on all protected endpoints — FastGPT 6.3 Medium2026-05-08
CVE-2026-44694 n8n-MCP: Authenticated SSRF in n8n-mcp webhook and API client paths — n8n-mcp--2026-05-08
CVE-2025-69233 Apache CloudStack: Domain/account resources limits not honored — Apache CloudStack 6.5 Medium2026-05-08
CVE-2026-34354 Akamai GPA/ZTC 本地权限提升漏洞(影响7.0-7.3.1等版本) — Guardicore Platform Agent 7.4 High2026-05-08
CVE-2026-41002 Spring Cloud Config 多个版本存在TOCTOU漏洞 — Spring Cloud Config 7.4 High2026-05-07
CVE-2026-44112 OpenClaw < 2026.4.22 - Symlink Swap Race Condition in OpenShell FS Bridge Writes — OpenClaw 5.3 Medium2026-05-06
CVE-2026-44113 OpenClaw < 2026.4.22 - Time-of-Check/Time-of-Use Race Condition in OpenShell FS Bridge — OpenClaw 5.3 Medium2026-05-06
CVE-2026-43582 OpenClaw < 2026.4.10 - DNS Rebinding SSRF via Hostname Validation Bypass — OpenClaw 6.3 Medium2026-05-06
CVE-2026-34596 Sandboxie-Plus local privilege escalation via TOCTOU race condition in UpdUtil addon installation — Sandboxie--2026-05-05
CVE-2026-7846 chatchat-space Langchain-Chatchat OpenAI-Compatible File Upload API openai_routes.py files toctou — Langchain-Chatchat 2.6 Low2026-05-05
CVE-2026-43529 OpenClaw < 2026.4.10 - Time-of-Check-Time-of-Use (TOCTOU) Race Condition in exec Script Preflight Validator — OpenClaw 2.5 Low2026-05-05
CVE-2026-6180 PaperCut MF: Card truncation on HP readers — PaperCut NG/MF 3.7AILowAI2026-05-05
CVE-2026-7791 Amazon WorkSpaces Windows <2.6.2034.0 权限管理漏洞致提权 — Workspaces 7.8 High2026-05-04
CVE-2025-47407 Time-of-check Time-of-use (TOCTOU) Race Condition in DSP Service — Snapdragon 7.8 High2026-05-04
CVE-2026-7724 PrefectHQ prefect Webhook/Notification validate_restricted_url toctou — prefect 5.0 Medium2026-05-04
CVE-2026-41360 OpenClaw < 2026.4.2 - Approval Integrity Bypass in pnpm dlx Local Script Binding — OpenClaw 6.7 Medium2026-04-23
CVE-2026-41338 OpenClaw < 2026.3.31 - Time-of-Check-Time-of-Use (TOCTOU) Vulnerability in Sandbox File Operations — OpenClaw 5.0 Medium2026-04-23
CVE-2026-41337 OpenClaw < 2026.3.31 - Callback Origin Mutation in Plivo Voice-call Replay — OpenClaw 5.3 Medium2026-04-23
CVE-2026-35376 uutils coreutils chcon Security Bypass and Mandatory Access Control (MAC) Inconsistency via TOCTOU Race Condition — coreutils 4.5 Medium2026-04-22
CVE-2026-35374 uutils coreutils split Arbitrary File Truncation via Time-of-Check to Time-of-Use (TOCTOU) Race Condition — coreutils 6.3 Medium2026-04-22
CVE-2026-35364 uutils coreutils mv Arbitrary File Overwrite via Cross-Device TOCTOU Race Condition — coreutils 6.3 Medium2026-04-22
CVE-2026-35362 uutils coreutils Missing TOCTOU Protection on Non-Linux Unix Platforms in Safe Traversal Module — coreutils 3.6 Low2026-04-22
CVE-2026-35360 uutils coreutils touch Arbitrary File Truncation via TOCTOU Race Condition — coreutils 6.3 Medium2026-04-22
CVE-2026-35359 uutils coreutils cp Information Disclosure via Time-of-Check to Time-of-Use Symlink Swap — coreutils 4.7 Medium2026-04-22
CVE-2026-35357 uutils coreutils cp Information Disclosure via Permission Handling Race — coreutils 4.7 Medium2026-04-22
CVE-2026-35356 uutils coreutils install Arbitrary File Overwrite with -D via Path Component Symlink Race — coreutils 6.3 Medium2026-04-22
CVE-2026-35355 uutils coreutils install Arbitrary File Overwrite via Symlink TOCTOU Race — coreutils 6.3 Medium2026-04-22
CVE-2026-35354 uutils coreutils mv Security Xattr TOCTOU Race in Cross-Device — coreutils 4.7 Medium2026-04-22
CVE-2026-35353 uutils coreutils mkdir Permission Exposure Race Condition with -m — coreutils 3.3 Low2026-04-22
CVE-2026-35352 uutils coreutils mkfifo Privilege Escalation via TOCTOU Race Condition — coreutils 7.0 High2026-04-22

Vulnerabilities classified as CWE-367 (检查时间与使用时间(TOCTOU)的竞争条件) represent 325 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.