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

    Ghost: Server-side request forgery via DNS rebinding in external request handling

    Ghost is a Node.js content management system. From 6.0.9 until 6.21.1, Ghost’s private-IP check for outbound HTTP requests could be bypassed via DNS rebinding, allowing an attacker to coerce the Ghost server into reaching hosts on internal networks through fe…

  • High 7.8

    sched/psi: fix race between file release and pressure write

    In the Linux kernel, the following vulnerability has been resolved: sched/psi: fix race between file release and pressure write A potential race condition exists between pressure write and cgroup file release regarding the priv member of struct kernfs_open_fi…

  • Low 2.2

    Pi: Race condition in auth.json writes could expose stored credentials

    Pi is a minimal terminal coding harness. From 0.74.0 until 0.78.1, Pi stored API keys and OAuth credentials in auth.json. A race condition in the file write path could briefly create or rewrite this file with permissions derived from the process umask before …

  • Low 3.7

    A flaw in Node.js HTTP Agent can cause a client to accept as valid a response that is send before the client has sent t…

  • High 8.1

    Weak polkit authentication check in qSnapper

    A time-to-check-time-of-use in polkit authentication of qSnapper before version 1.3.3 allowed a local attacker to bypass qSnappers authentication mechanism and operate e.g. as root user.

  • Critical 9.0

    Crossplane: Signature verification TOCTOU allows installing unverified package content via mutable tag

    ## Summary Crossplane allows package signature verification to be configured via the `ImageConfig` mechanism. When enabled, the package manager uses cosign to verify that packages are correctly signed before pulling and installing them. When a package is inst…

  • Medium 5.8

    pam_usb: TOCTOU race condition in pad directory creation allows symlink substitution

    pam_usb provides hardware authentication for Linux using ordinary removable media. In versions prior to 0.9.2, a symlink race condition exists in per-device and per-user pad directory creation. pam_usb uses a check-then-act pattern: it calls lstat() to test f…

  • Low 3.7

    undici vulnerable to HTTP response queue poisoning via keep-alive socket reuse

    Impact: Undici's HTTP/1.1 client is vulnerable to response queue poisoning on reused keep-alive sockets. An attacker-controlled upstream server can inject an unsolicited HTTP/1.1 response onto an idle socket after a request completes. When the client dispatch…

  • High 7.8

    Abrt: toctou race condition in abrt-dbus setelement allows arbitrary file writes to dump directories

    A time-of-check time-of-use (TOCTOU) race condition was found in the abrt-dbus D-Bus service's SetElement method. Between dump directory creation and post-create event execution, any local user can call SetElement to write arbitrary text files into the root-o…

  • Critical 9.8

    OpenClaw < 2026.5.27 - Node Pairing State Mutation via Reconnection

    OpenClaw before 2026.5.27 contains a state mutation vulnerability in node pairing reconnection that allows paired nodes to confuse approval scope decisions. Attackers can exploit reconnection logic to restore or present broader node authority than intended, p…

  • High 8.3

    OpenClaw < 2026.5.18 - Arbitrary File Read via Shell Expansion in system.run Safe-bin Allowlist

    OpenClaw before 2026.5.18 contains a policy enforcement vulnerability in system.run safe-bin allowlist validation that allows shell expansion to modify command interpretation on POSIX nodes. Authenticated operators can exploit shell metacharacters in approved…

  • High 8.8

    OpenClaw < 2026.5.18 - Command Argument Modification via Shell Wrapper Between Approval and Execution

    OpenClaw before 2026.5.18 contains a command injection vulnerability where shell wrapper argv could change between approval and execution. Attackers can rebuild command arguments after allowlist approval to execute unapproved command shapes, potentially bypas…

  • Medium 5.0

    Kitty has an Arbitrary File Write via Symlink Race Condition in File Transmission Protocol

    Kitty is a cross-platform GPU based terminal. In versions prior to 0.47.2, a local privilege escalation vulnerability exists in kitty's file transmission protocol where a child process running in the terminal can write to arbitrary files on the filesystem by …

  • High 8.1

    Appsmith Super User Creation Race Condition Allows Multiple Instance Administrators

    ## Summary The `/api/v1/users/super` endpoint enforces a restriction that only one super user (Instance Administrator) can be created during initial setup. However, due to a Time-of-Check-Time-of-Use (TOCTOU) race condition in the `signupAndLoginSuper()` meth…

  • High 7.2

    Moby: Race condition in docker cp allows bind mount redirection to host path

    Moby is an open source container framework. In Docker Engine prior to version 29.5.1, Docker Daemon versions 28.5.2 and prior, and Moby Daemon prior to version 2.0.0-beta.14, a race condition during docker cp mount setup allows a malicious container to redire…

  • Medium 6.1

    Moby: Race condition in docker cp allows creation of arbitrary empty files on the host via symlink swap

    Moby is an open source container framework. In Docker Engine prior to version 29.5.1, Docker Daemon versions 28.5.2 and prior, and Moby Daemon prior to version 2.0.0-beta.14, a race condition during docker cp mount setup allows a malicious container to create…

  • High 7.4

    Apache CXF: OAuth2: TOCTOU Race Condition in Refresh Token Processing

    A race condition in AbstractOAuthDataProvider allows concurrent requests using the same Refresh Token to bypass single-use semantics and generate multiple valid Access Tokens, when 'recycleRefreshTokens' is set to false. A leaked refresh token can be replayed…

  • High 8.8

    OpenClaw < 2026.5.12 - Shell Option Parsing Bypass in Exec Revalidation

    OpenClaw before 2026.5.12 contains a shell option parsing vulnerability that allows combined POSIX shell flags to bypass exec revalidation checks. Attackers can exploit this by using combined shell options to execute inline shell content without intended allo…

  • High 8.4

    Slate Digital Connect macOS XPC PID validation privilege escalation

    Slate Digital Connect 1.37.0 for macOS installs a privileged helper tool, com.slatedigital.connect.privileged.helper.tool, which exposes the XPC service com.slatedigital.connect.privileged.helper.tool2. The helper validates connecting XPC clients by obtaining…

  • Medium 5.5

    Microsoft Defender for Endpoint for Mac Elevation of Privilege Vulnerability

    Time-of-check time-of-use (toctou) race condition in Microsoft Defender for Endpoint allows an authorized attacker to elevate privileges locally.

  • High 7.8

    Windows Program Compatibility Assistant Service Elevation of Privilege Vulnerability

    Time-of-check time-of-use (TOCTOU) race condition in Program Compatibility Assistant Service allows an authorized attacker to elevate privileges locally.

  • Medium 5.0

    Hermes WebUI < 0.51.303 TOCTOU Race Condition via git_discard

    Hermes WebUI before version 0.51.303 contains a time-of-check time-of-use (TOCTOU) race condition vulnerability in the git_discard function within api/workspace_git.py that allows attackers to delete files outside the configured workspace boundary by replacin…

  • High 8.1

    Local Privilege Escalation via Insecure XPC Client Validation in Waves Central for macOS

    Waves Central for macOS versions 13.0.9 through 16.5.5 contain a local privilege escalation vulnerability in the privileged helper service. The helper validates connecting XPC clients using the client process identifier (PID) to verify code-signing identity. …

  • High 7.3

    X-VPN macOS website versions - Local Privilege Escalation

    A vulnerability in the quarantine and restore workflow of the X-VPN macOS website versions 77.0 through 77.5 allow a local attacker to leverage a race condition and symlink manipulation to achieve privileged file corruption.

  • High 7.3

    SWUpdate Untrusted Script Execution via Signed Update TOCTOU

    SWUpdate before 2026.05 is affected by a time-of-check time-of-use (TOCTOU) race condition that allows local unprivileged attackers to escalate privileges to root or install untrusted contents using a signed update.

  • Low 2.3

    Pterodactyl has a database resource limit bypass via race condition in Client API

    Pterodactyl is a free, open-source game server management panel. Prior to version 1.12.3, the Pterodactyl Client API has a logic flaw that lets users bypass their assigned limits for database allocations. This happens because the database locking mechanism us…

  • High 7.4

    A privilege escalation vulnerability exists in PlayStation 4 firmware versions 13.00 through 13.02. The BD-J (Blu-ray D…

  • High 7.8

    Time-of-check Time-of-use (TOCTOU) Race Condition in DSP Service

    Memory Corruption when accessing shared buffers without validation of concurrent user-mode input modifications.

  • Medium 6.4

    Time-of-check Time-of-use (TOCTOU) Race Condition in Camera Driver

    Memory Corruption when processing IOCTL requests with mismatched API versions due to concurrent modification of user-space buffer.

  • Medium 6.4

    In geniezone, there is a possible out of bounds write due to a race condition. This could lead to local escalation of p…

  • Medium 6.5

    AVideo CVE-2026-43884 incomplete fix - `isSSRFSafeURL()` call sites still discard the `$resolvedIP` out-param at master HEAD post

    WWBN AVideo is an open source video platform. In 29.0 and earlier, EpgParser.php, plugin/AI/receiveAsync.json.php, and other locations do not use the $resolvedIP out-param of isSSRFSafeURL() for DNS pinning via CURLOPT_RESOLVE, opening DNS-rebinding TOCTOU.

  • High 7.8

    sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL

    In the Linux kernel, the following vulnerability has been resolved: sctp: revalidate list cursor after sctp_sendmsg_to_asoc() in SCTP_SENDALL The SCTP_SENDALL path in sctp_sendmsg() iterates ep->asocs with list_for_each_entry_safe(), which caches the next ent…

  • Medium 6.5

    Keycloak: keycloak: privilege escalation via time-of-check to time-of-use (toctou) vulnerability

    A flaw was found in Keycloak. An authenticated administrator with the `manage-clients` role can exploit a Time-of-check to time-of-use (TOCTOU) vulnerability in the name-based admin role checks. This allows the attacker to escalate their privileges to `realm-…

  • Medium 5.1

    MaxKB: SSRF Bypass via DNS Rebinding in MaxKB OSS URL Fetch

    MaxKB is an open-source AI assistant for enterprise. MaxKB 2.8.0 and prior are vulnerable to a server-side request forgery (SSRF) bypass in the OSS file service URL fetch functionality due to inconsistent DNS resolution between validation and actual request e…

  • High 7.8

    NVIDIA Display Driver for Windows contains a vulnerability where an attacker could cause a time-of-check time-of-use is…

  • High 7.8

    A time-of-check time-of-use vulnerability in the Apex One/SEP agent could allow a local attacker to escalate privileges…

  • High 7.8

    A time-of-check time-of-use vulnerability in the Trend Micro Apex One (mac) agent cache mechanism could allow a local a…

  • High 7.0

    A time-of-check time-of-use vulnerability in the Trend Micro Apex One (mac) agent iCore service signature verification …

  • Low 3.7

    TOCTOU with root privilege in ad_flush

    A time-of-check time-of-use (TOCTOU) condition in the ad_flush function in Netatalk 3.0.0 through 4.4.2 involves root-privileged file operations, which may allow a remote attacker to cause limited data modification under specific race conditions.

  • High 7.5

    SIG(0) validation during query flood may lead to undefined behavior

    Undefined behavior may result due to a race condition leading to a use-after-free violation. If BIND receives an incoming DNS message signed with SIG(0), it begins work to validate that signature. If, during that validation, the "recursive-clients" limit is r…