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

427 results · Clear filters · Feed

  • High 8.5

    Budibase: SSRF via DNS rebinding in the REST datasource integration

    Budibase is an open-source low-code platform. Prior to 3.40.0, packages/backend-core/src/utils/outboundFetch.ts pinned a validated address through a Node agent, but the REST integration used getDispatcher from packages/backend-core/src/utils/fetch.ts, causing…

  • High 8.5

    IBM i is Affected By Multiple SQL Vulnerabilities [, ]

    IBM i 7.6, 7.5, 7.4, and 7.3 could allow a remote authenticated attacker to gain unauthorized access to system objects due to a time-of-check to time-of-use (TOCTOU) race condition involving symbolic links.

    IBM i
  • High 7.1

    IBM i is Affected By Multiple Vulnerabilities in Network Authentication Service

    IBM i 7.6, 7.5, 7.4, and 7.3 could allow a local authenticated attacker to obtain unauthorized access to files due to a time-of-check time-of-use (TOCTOU) race condition.

    IBM i
  • High 7.8

    TOCTOU double-fetch in `zsock_sendmsg`/`recvmsg` userspace verifiers allows kernel-heap out-of-bounds write

    The userspace syscall verifiers z_vrfy_zsock_sendmsg() and z_vrfy_zsock_recvmsg() in subsys/net/lib/sockets/sockets.c snapshot the caller-supplied struct net_msghdr into a kernel-side copy with k_usermode_from_copy(), but then re-read the still-live user stru…

  • High 7.0

    Windows Common Log File System Driver Elevation of Privilege Vulnerability

    Time-of-check time-of-use (toctou) race condition in Windows Common Log File System Driver allows an authorized attacker to elevate privileges locally.

  • High 8.8

    drm/amdgpu/vcn4: avoid rereading IB param length

    In the Linux kernel, the following vulnerability has been resolved: drm/amdgpu/vcn4: avoid rereading IB param length Reuse the parameter length returned by vcn_v4_0_enc_find_ib_param() instead of rereading it from the IB. This avoids a potential TOCTOU issue …

  • High 7.4

    fastschema - TOCTOU Race Condition Bypasses OTP Attempt Limit in Account Recovery

    A time-of-check/time-of-use (TOCTOU) race condition in fastschema through v0.15.1 allows an unauthenticated remote attacker to bypass the OTP attempt limit on the account recovery flow, enabling brute-force attacks on 6-digit OTP codes.

  • High 8.1

    llama.cpp b7492–b9060 Use-After-Free in Tokenization Endpoints

    llama.cpp builds b7492 through the latest b9060 contains a use-after-free vulnerability in llama-server affecting six tokenization endpoints (/tokenize, /detokenize, /infill, /apply-template, /rerank, and /anthropic/count_tokens) that bypass the task queue an…

  • High 8.1

    Apache CXF: OAuth2 Authorization Code Replay via TOCTOU in JCacheCodeDataProvider

    A race condition in JCacheCodeDataProvider allows an attacker to redeem a single authorization code multiple times via concurrent requests, resulting in the issuance of multiple distinct, valid access tokens. Users are recommended to upgrade to versions 4.2.3…

  • High 7.5

    PraisonAI: SSRF in web_crawl tool via redirect-following and DNS rebinding (validate-then-fetch gap)

    PraisonAI is a multi-agent teams system. In versions prior to 1.6.58, the web_crawl tool performs its SSRF check only on the initially supplied URL, allowing the protection to be bypassed so the tool connects to attacker-chosen internal destinations. The chec…

  • High 8.5

    Memos Webhook DNS Rebinding TOCTOU SSRF in safeDialContext()

    Memos' webhook dispatch function safeDialContext (internal/webhook/webhook.go) resolves the target hostname via net.DefaultResolver.LookupHost and validates the resulting IPs against reserved ranges, but then dials net.JoinHostPort(host, port) using the origi…

  • High 8.9

    Misskey: JSON-LD signature validation + compaction is vulnerable to timing attacks

    Misskey is an open source, federated social media platform. Versions 12.37.0 and later, but prior to 2026.5.4, are vulnerable to timing attacks during JSON-LD signature validation and the compaction process. Because the JSON-LD parsing context is not shared b…

  • High 7.4

    Netty: TOCTOU in OcspServerCertificateValidator

    Netty is an asynchronous, event-driven network application framework. Prior to versions 4.1.136.Final and 4.2.16.Final, the OcspServerCertificateValidator forwards the SslHandshakeCompletionEvent before the asynchronous OCSP validation completes. This allows …

  • High 7.5

    datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding

    datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. Prior to 0.63.0, datamodel-code-generator validates a URL host once in src/datamo…

  • High 7.8

    grant-table: type confusion in grant-copy

    When grant-copy operations are processed, the respective grant may or may not already be in use by another operation (a mapping or another copy). For all copy operations the referenced guest frame is looked up. When another operation is already active for the…

  • High 8.9

    n8n before 1.123.64 Remote Code Execution via Git Clone

    n8n before 1.123.64, 2.29.8, and 2.30.1 contains a TOCTOU race condition in the Git node's clone operation that allows authenticated users to bypass path restrictions by swapping a directory for a symlink after the path is validated but before the clone runs.…

  • High 8.8

    KVM: SEV: Use READ_ONCE() when reading entries/indices from PSC buffer

    In the Linux kernel, the following vulnerability has been resolved: KVM: SEV: Use READ_ONCE() when reading entries/indices from PSC buffer Use READ_ONCE() when reading entries/indices from the guest-accessible Page State Change buffer to defend against TOCTOU…

  • High 7.1

    OpenClaw < 2026.5.28 Authentication Bypass via safeFetch

    OpenClaw before 2026.5.28 contains a race condition in the MS Teams safeFetch DNS rebinding check. When the affected feature is enabled and reachable, a lower-trust caller or configured input path could win a timing window between the DNS validation check and…

  • High 7.0

    Zoom Clients for Windows - Race Condition

    A time-of-check to time-of-use (TOCTOU) race condition in the installation and uninstallation process of certain Zoom Clients for Windows could allow an authenticated local user to escalate privileges.

  • High 8.1

    Better Auth OAuth Provider: Refresh Token Rotation Race Condition Allows Concurrent Replay and Token Family Forking

    Better Auth is an authentication and authorization library for TypeScript. From 1.4.8-beta.7 until 1.6.11, the @better-auth/oauth-provider POST /oauth2/token endpoint on the refresh_token grant performs a non-atomic read, validate, revoke, and mint sequence o…

  • High 7.6

    Better Auth OAuth Provider: Race Condition in Authorization Code Exchange Enables Multi-Use Code Redemption

    Better Auth is an authentication and authorization library for TypeScript. From 1.6.0 until 1.6.11, the @better-auth/oauth-provider POST /oauth2/token endpoint for the authorization_code grant redeems a single-use authorization code through a non-atomic find-…

  • High 7.5

    Diffusers: TOCTOU Trust Remote Code Bypass

    Diffusers is the a library for pretrained diffusion models. Prior to 0.38.0, Diffusers' DiffusionPipeline.from_pretrained flow can bypass the trust_remote_code guard because download() validates model_index.json and custom pipeline code before later loading f…

  • High 8.5

    PraisonAI before 1.6.78 DNS Rebinding SSRF via web_crawl

    PraisonAI before 1.6.78 contains a server-side request forgery vulnerability in the web_crawl tool that validates hostnames at check time but re-resolves them at connection time without IP pinning. Attackers can use DNS rebinding to bypass SSRF protection and…

  • High 7.8

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

    Creative Cloud Desktop is affected by a Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability that could result in arbitrary code execution in the context of the current user. Exploit depends on conditions beyond the attacker's control. Exploitation…

  • High 7.5

    Windows NFS Server Elevation of Privilege Vulnerability

    Time-of-check time-of-use (toctou) race condition in Windows Network File System allows an authorized attacker to elevate privileges over a network.

  • High 7.8

    Windows Kernel Elevation of Privilege Vulnerability

    Null pointer dereference in Windows Kernel allows an authorized attacker to elevate privileges locally.

  • High 7.0

    Microsoft Defender for Endpoint for Mac Elevation of Privilege Vulnerability

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

  • High 7.1

    OpenClaw < 2026.6.9 Symlink Following via Mirror Sync

    OpenClaw versions before 2026.6.9 contain a symlink following vulnerability in the mirror sync feature that allows lower-trust callers to perform actions requiring stronger authorization. Attackers can exploit remote symlink parents to bypass policy checks an…

  • High 8.5

    PraisonAI before 1.6.78 SSRF via Crawl4AI Chromium backend

    PraisonAI versions before 1.6.78 contain a server-side request forgery vulnerability in the Crawl4AI/Chromium backend that allows attackers to bypass SSRF validation by exploiting DNS rebinding and HTTP redirects. Attackers can craft URLs that resolve to inte…

  • High 7.8

    GPU DDK - rgxfw_hwperf_ufo() re-reads psCmdHeader->ui32CmdSize after initial check, TOCTOU

    Kernel software installed and running inside a Host VM may post improper commands to the GPU Firmware to trigger a memory write outside the permitted range of memory for the host kernel. A TOCTOU bug existed where a malicious driver could modify values in mem…

  • High 7.4

    9router: Image prefetch DNS rebinding allows SSRF to internal services

    9Router is an AI router & token saver. Prior to 0.5.2, 9router validates image URLs by resolving the host before fetching, but open-sse/translator/concerns/image.js performs the later server-side image fetch with a separate DNS resolution. An authenticated at…

  • High 7.2

    PraisonAI before 4.6.78 Unauthenticated SSRF via webhook_url

    PraisonAI before 4.6.78 contains an unauthenticated server-side request forgery vulnerability in the Jobs API /api/v1/runs endpoint. The webhook_url parameter is validated at request time but re-resolved at connection time, allowing attackers to use DNS rebin…

  • High 7.8

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

    Memory Corruption when processing asynchronous input parameters due to improper handling of modified values between check and use.

  • High 7.5

    Microsoft Edge for Android Remote Code Execution Vulnerability

    Time-of-check time-of-use (toctou) race condition in Microsoft Edge for Android allows an unauthorized attacker to execute code over a network.

  • High 8.7

    DTLS listener crash via race condition in dtls_packet_demux causes denial of service for all sessions

    Time-of-check Time-of-use (TOCTOU) race condition vulnerability in Erlang/OTP ssl (dtls_packet_demux module) allows an unauthenticated remote attacker to crash all active DTLS sessions on a listener. A DTLS server listener uses a single shared dtls_packet_dem…

  • High 8.5

    NVIDIA Container Toolkit for Linux contains a vulnerability where an attacker could cause a time-of-check time-of-use r…

  • High 8.5

    Budibase: Potential SSRF DNS rebinding bypass in outbound fetch validation

    Budibase is an open-source low-code platform. Prior to 3.39.9, authenticated users with automation permissions can bypass Budibase's SSRF blacklist through DNS rebinding. The outbound fetch flow validates a hostname against the blacklist before the request is…

  • High 7.5
    CVE-2026-52885 Public exploit

    Notepad++ TOCTOU: HMAC Checks Disk, Executes from Memory

    Notepad++ is a free and open-source source code editor. Prior to 8.9.6.4, NppCommands.cpp checks the HMAC of the on-disk shortcuts.xml at the moment a user command fires (Time-of-Check). However, the command payload is taken from the in-memory _userCommands v…

  • High 8.4

    File Browser: Improper Access Control Occurs via Pre-Created Public Share for a Non-existent Path

    File Browser is a file managing interface for uploading, deleting, previewing, renaming, and editing files within a specified directory. Prior to 2.63.7, `POST /api/share/<path>` accepts an authenticated request for an arbitrary path and stores a public share…

  • High 7.8

    xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata()

    In the Linux kernel, the following vulnerability has been resolved: xsk: cache csum_start/csum_offset to fix TOCTOU in xsk_skb_metadata() The TX metadata area resides in the UMEM buffer which is memory-mapped and concurrently writable by userspace. In xsk_skb…