Skip to content
OpenAdvisories

Weakness (CWE)

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

Base Incomplete

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.

How to prevent it (7 mitigations)
  1. 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.

  2. 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.

  3. Architecture and Design

    Limit the interleaving of operations on files from multiple processes.

  4. 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.

  5. Implementation

    Recheck the resource after the use call to verify that the action was taken appropriately.

  6. Architecture and Design

    Ensure that some environmental locking mechanism can be used to protect resources effectively.

  7. 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-367

854 results · Feed

  • Medium 4.7

    uutils coreutils mv Security Xattr TOCTOU Race in Cross-Device

    A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the mv utility of uutils coreutils during cross-device moves. The extended attribute (xattr) preservation logic uses multiple path-based system calls that perform fresh path-to-inode lookups for …

  • Low 3.3

    uutils coreutils mkdir Permission Exposure Race Condition with -m

    The mkdir utility in uutils coreutils incorrectly applies permissions when using the -m flag by creating a directory with umask-derived permissions (typically 0755) before subsequently changing them to the requested mode via a separate chmod system call. In m…

  • High 7.0

    uutils coreutils mkfifo Privilege Escalation via TOCTOU Race Condition

    A Time-of-Check to Time-of-Use (TOCTOU) race condition exists in the mkfifo utility of uutils coreutils. The utility creates a FIFO and then performs a path-based chmod to set permissions. A local attacker with write access to the parent directory can swap th…

  • Medium 5.3

    uutils coreutils tail Privileged Information Disclosure via Symlink Replacement Race

    A vulnerability in the tail utility of uutils coreutils allows for the exfiltration of sensitive file contents when using the --follow=name option. Unlike GNU tail, the uutils implementation continues to monitor a path after it has been replaced by a symbolic…

  • High 8.8
    CVE-2026-41651 Public exploit

    PackageKit vulnerable to TOCTOU Race on Transaction Flags leads to arbitrary package installation as root

    PackageKit is a a D-Bus abstraction layer that allows the user to manage packages in a secure way using a cross-distro, cross-architecture API. PackageKit between and including versions 1.0.2 and 1.3.4 is vulnerable to a time-of-check time-of-use (TOCTOU) rac…

  • Medium 4.8

    Spring Security JdbcOneTimeTokenService allows a one-time token to authenticate multiple sessions

    Vulnerability in Spring Spring Security. Applications that explicitly configure One-Time Token login with JdbcOneTimeTokenService are vulnerable to a Time-of-check Time-of-use (TOCTOU) race condition. This issue affects Spring Security: from 6.4.0 through 6.4…

  • High 8.2

    OpenClaw < 2026.3.31 - Sandbox Escape via TOCTOU Race in Remote FS Bridge readFile

    OpenClaw before 2026.3.31 contains a time-of-check-time-of-use race condition in the remote filesystem bridge readFile function that allows sandbox escape. Attackers can exploit the separate path validation and file read operations to bypass sandbox restricti…

  • Medium 6.5

    OpenProject has Cross-Project Meeting Agenda Item Injection via Unscoped Section Lookup

    OpenProject is open-source, web-based project management software. Prior to version 17.3.0, a user with `manage_agendas` permission in any project can inject agenda items into meetings belonging to any other project on the instance — even projects they have n…

  • Low 2.1

    Race Condition in GNU Sed

    When sed is invoked with both -i (in-place edit) and --follow-symlinks, the function open_next_file() performs two separate, non-atomic filesystem operations on the same path: 1. resolves symlink to its target and stores the resolved path for determining when…

  • Medium 5.4

    A Download of Code Without Integrity Check vulnerability in the update modules in ASUS Member Center(华硕大厅) allows a loc…

  • Medium 5.4
    CVE-2026-1880 Public exploit

    An Incorrect Permission Assignment for Critical Resource vulnerability in the ASUS DriverHub update process allows priv…

  • Medium 6.5

    Race Condition in Guest Magic Link Authentication Allows Token Reuse

    Mattermost versions 10.11.x <= 10.11.12, 11.5.x <= 11.5.0, 11.4.x <= 11.4.2, 11.3.x <= 11.3.2 fail to enforce atomic single-use consumption of guest magic link tokens, which allows an attacker with access to a valid magic link to establish multiple independen…

  • High 7.0

    Windows Function Discovery Service (fdwsd.dll) Elevation of Privilege Vulnerability

    Concurrent execution using shared resource with improper synchronization ('race condition') in Function Discovery Service (fdwsd.dll) allows an authorized attacker to elevate privileges locally.

  • High 7.0

    Windows LUA File Virtualization Filter Driver Elevation of Privilege Vulnerability

    Time-of-check time-of-use (toctou) race condition in Windows LUAFV allows an authorized attacker to elevate privileges locally.

  • Low 3.5

    EspoCRM: SSRF via DNS Rebinding in Attachment fromImageUrl Endpoint Allows Internal Network Access

    EspoCRM is an open source customer relationship management application. In versions 9.3.3 and below, the POST /api/v1/Attachment/fromImageUrl endpoint is vulnerable to Server-Side Request Forgery (SSRF) via a DNS rebinding (TOCTOU) condition. Host validation …

  • Low 3.7

    OpenClaw < 2026.3.22 - Policy Bypass via Unvalidated Queued Node Actions

    OpenClaw before 2026.3.22 contains a policy bypass vulnerability where queued node actions are not revalidated against current command policy when delivered. Attackers can exploit stale allowlists or declarations that survive policy tightening to execute unau…

  • Medium 6.7

    Libcap: libcap: privilege escalation via toctou race condition in cap_set_file()

    A flaw was found in libcap. A local unprivileged user can exploit a Time-of-check-to-time-of-use (TOCTOU) race condition in the `cap_set_file()` function. This allows an attacker with write access to a parent directory to redirect file capability updates to a…

  • Medium 4.2

    Homarr has a Race Condition in Invite Token Registration (TOCTOU)

    Homarr is an open-source dashboard. Prior to 1.57.0, the user registration endpoint (/api/trpc/user.register) is vulnerable to a race condition that allows an attacker to create multiple user accounts from a single-use invite token. The registration flow perf…

  • Medium 4.7

    util-linux: TOCTOU Race Condition in util-linux mount(8) - Loop Device Setup

    util-linux is a random collection of Linux utilities. Prior to version 2.41.4, a TOCTOU (Time-of-Check-Time-of-Use) vulnerability has been identified in the SUID binary /usr/bin/mount from util-linux. The mount binary, when setting up loop devices, validates …

  • High 7.5
    CVE-2026-30332 Public exploit

    A Time-of-Check to Time-of-Use (TOCTOU) race condition vulnerability in Balena Etcher for Windows prior to v2.1.4 allow…

  • Medium 5.8

    Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape

    The Claude SDK for Python provides access to the Claude API from Python applications. From version 0.86.0 to before version 0.87.0, the async local filesystem memory tool in the Anthropic Python SDK validated that model-supplied paths resolved inside the sand…

  • Low 2.1

    Parse Server: MFA single-use token bypass via concurrent authData login requests

    Parse Server is an open source backend that can be deployed to any infrastructure that can run Node.js. Prior to versions 8.6.64 and 9.7.0-alpha.8, an attacker who possesses a valid authentication provider token and a single MFA recovery code or SMS one-time …

  • High 7.5

    OpenClaw < 2026.3.11 - Sandbox Boundary Bypass via Unvalidated Temporary File Creation

    OpenClaw before 2026.3.11 contains a sandbox boundary bypass vulnerability in fs-bridge staged writes where temporary file creation and population are not pinned to a verified parent directory. Attackers can exploit a race condition in parent-path alias chang…

  • Medium 6.3

    OpenClaw < 2026.3.11 - Sandbox Boundary Bypass via Unanchored writeFile Commit Path

    OpenClaw before 2026.3.11 contains a sandbox boundary bypass vulnerability in the fs-bridge writeFile commit step that uses an unanchored container path during the final move operation. An attacker can exploit a time-of-check-time-of-use race condition by mod…

  • Medium 6.3

    OpenClaw < 2026.3.8 - Script Content Modification via Mutable Operand Binding in system.run

    OpenClaw before 2026.3.8 contains an approval bypass vulnerability in system.run where mutable script operands are not bound across approval and execution phases. Attackers can obtain approval for script execution, modify the approved script file before execu…

  • Medium 5.8

    Incomplete privilege drop for com.system76.CosmicGreeter.GetUserData

    A Privilege Dropping / Lowering Errors/Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in  cosmic-greeter can allow an attacker to regain privileges that should have been dropped and abuse them in the racy checking logic. This issue affects co…

  • Low 3.7

    Handlebars.js has a Property Access Validation Bypass in container.lookup

    ## Summary In `lib/handlebars/runtime.js`, the `container.lookup()` function uses `container.lookupProperty()` as a gate check to enforce prototype-access controls, but then discards the validated result and performs a second, unguarded property access (`dept…

  • Medium 6.2

    OpenClaw < 2026.3.8 - Path Traversal via Tools Root Rebinding in Skills Download

    OpenClaw before 2026.3.8 contains a path traversal vulnerability in the skills download installer that validates the tools root lexically but reuses the mutable path during archive download and copy operations. A local attacker can rebind the tools-root path …

  • High 7.3

    OpenClaw < 2026.3.11 - Unbound Interpreter and Runtime Commands Bypass in node-host Approval

    OpenClaw before 2026.3.11 contains an approval integrity vulnerability allowing attackers to execute rewritten local code by modifying scripts between approval and execution when exact file binding cannot occur. Remote attackers can change approved local scri…

  • Low 2.1

    Parse Server: MFA recovery code single-use bypass via concurrent requests

    Parse Server is an open source backend that can be deployed to any infrastructure that can run Node.js. Prior to versions 8.6.60 and 9.6.0-alpha.54, an attacker who obtains a user's password and a single MFA recovery code can reuse that recovery code an unlim…

  • High 7.8

    Use after free of paging structures in EPT

    The Intel EPT paging code uses an optimization to defer flushing of any cached EPT state until the p2m lock is dropped, so that multiple modifications done under the same locked region only issue a single flush. Freeing of paging structures however is not def…

  • Medium 6.5

    OpenClaw < 2026.2.25 - Time-of-Check-Time-of-Use via Mutable Symlink in system.run cwd Parameter

    OpenClaw versions prior to 2026.2.25 contain a time-of-check-time-of-use vulnerability in approval-bound system.run execution where the cwd parameter is validated at approval time but resolved at execution time. Attackers can retarget a symlinked cwd between …

  • Medium 6.0

    OpenClaw < 2026.3.1 - Executable Rebind via Unbound PATH-token in system.run Approvals

    OpenClaw versions prior to 2026.3.1 fail to pin executable identity for non-path-like argv[0] tokens in system.run approvals, allowing post-approval executable rebind attacks. Attackers can modify PATH resolution after approval to execute a different binary t…

  • Medium 5.3

    OpenClaw < 2026.3.2 - Arbitrary File Write via ZIP Extraction Parent Symlink Race Condition

    OpenClaw versions prior to 2026.3.2 contain a race condition vulnerability in ZIP extraction that allows local attackers to write files outside the intended destination directory. Attackers can exploit a time-of-check-time-of-use race between path validation …

  • Low 2.3

    Parse Server has a password reset token single-use bypass via concurrent requests

    Parse Server is an open source backend that can be deployed to any infrastructure that can run Node.js. Prior to 9.6.0-alpha.28 and 8.6.48, the password reset mechanism does not enforce single-use guarantees for reset tokens. When a user requests a password r…

  • Medium 6.1

    OpenClaw < 2026.2.26 - Approval Bypass via Parent Symlink Current Working Directory Rebind

    OpenClaw versions prior to 2026.2.26 contain an approval bypass vulnerability in system.run execution that allows attackers to execute commands from unintended filesystem locations by rebinding writable parent symlinks in the current working directory after a…

  • High 7.6

    OpenClaw < 2026.3.2 - DNS Pinning Bypass via Environment Proxy Configuration in web_fetch

    OpenClaw versions prior to 2026.3.2 contain a DNS pinning bypass vulnerability in strict URL fetch paths that allows attackers to circumvent SSRF guards when environment proxy variables are configured. When HTTP_PROXY, HTTPS_PROXY, or ALL_PROXY environment va…

  • Medium 5.3

    OpenClaw < 2026.3.2 - Path Confinement Bypass in Browser Output and File Write Operations

    OpenClaw versions prior to 2026.3.2 contain a path-confinement bypass vulnerability in browser output handling that allows writes outside intended root directories. Attackers can exploit insufficient canonical path-boundary validation in file write operations…

  • High 7.0

    OpenClaw: Sandbox dangling-symlink alias handling could bypass workspace-only write boundary

    ### Summary A sandbox boundary-validation gap in symlink alias handling allowed certain workspace-only write paths to be treated as in-boundary even when they could resolve outside the workspace/sandbox root. ### Affected Packages / Versions - Package: npm `o…

  • Medium 5.6

    Time-of-check time-of-use race condition in the UEFI PdaSmm module for some Intel(R) reference platforms may allow an i…