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

856 results · Feed

  • Medium 6.7

    Time-of-check Time-of-use Race Condition in Multimedia Framework

    Memory corruption in Multimedia Framework due to unsafe access to the data members

  • Medium 6.4
  • High 7.1

    A Time-of-Check Time-of-Use bug existed in the Maintenance (Updater) Service that could be abused to grant Users write …

  • High 7.5

    When installing an add-on, Firefox verified the signature before prompting the user; but while the user was confirming …

  • Medium 6.9

    TOCTOU vulnerability in Samsung decoding library for video thumbnails prior to SMR Dec-2022 Release 1 allows local atta…

  • Medium 5.3

    WordPress WP ULike Plugin <= 4.6.4 is vulnerable to Race Condition vulnerability

    Unauth. Race Condition vulnerability in WP ULike Plugin <= 4.6.4 on WordPress allows attackers to increase/decrease rating scores.

  • High 7.5

    An Arm product family through 2022-06-29 has a TOCTOU Race Condition that allows non-privileged user to make improper G…

  • High 7.0

    A Time-of-Check Time-Of-Use vulnerability in the Trend Micro Apex One and Apex One as a Service agent could allow a loc…

  • High 7.5

    In UsbCoreDxe, tampering with the contents of the USB working buffer using DMA while certain USB transactions are in pr…

  • High 7.8

    DMA transactions which are targeted at input buffers used for the StorageSecurityCommandDxe software SMI handler could …

  • High 7.0

    DMA transactions which are targeted at input buffers used for the SdMmcDevice software SMI handler could cause SMRAM co…

  • High 7.0

    DMA transactions which are targeted at input buffers used for the NvmExpressLegacy software SMI handler could cause SMR…

  • Medium 6.4

    DMA attacks on the parameter buffer used by the VariableRuntimeDxe software SMI handler could lead to a TOCTOU attack. …

  • Medium 6.4

    DMA transactions which are targeted at input buffers used for the software SMI handler used by the IdeBusDxe driver cou…

  • High 7.0

    DMA transactions which are targeted at input buffers used for the HddPassword software SMI handler could cause SMRAM co…

  • High 7.0

    DMA transactions which are targeted at input buffers used for the NvmExpressDxe software SMI handler could cause SMRAM …

  • High 7.0

    DMA transactions which are targeted at input buffers used for the AhciBusDxe software SMI handler could cause SMRAM cor…

  • Medium 6.4

    DMA attacks on the parameter buffer used by the Int15ServiceSmm software SMI handler could lead to a TOCTOU attack on t…

  • Medium 6.4

    DMA transactions which are targeted at input buffers used for the FwBlockServiceSmm software SMI handler could cause SM…

  • High 7.0

    DMA transactions which are targeted at input buffers used for the SdHostDriver software SMI handler could cause SMRAM c…

  • Medium 6.4

    DMA transactions which are targeted at input buffers used for the SmmResourceCheckDxe software SMI handler cause SMRAM …

  • Medium 6.4

    Update description and links DMA transactions which are targeted at input buffers used for the software SMI handler use…

  • Medium 6.4

    DMA attacks on the parameter buffer used by the PnpSmm driver could change the contents after parameter values have bee…

  • Medium 6.4

    DMA attacks on the parameter buffer used by the IhisiSmm driver could change the contents after parameter values have b…

  • High 7.9

    Time-of-check time-of-use race condition in the BIOS firmware for some Intel(R) Processors may allow a privileged user …

  • Medium 6.4

    In jpeg, there is a possible use after free due to a race condition. This could lead to local escalation of privilege w…

  • Medium 5.9

    Alpine before 2.25 allows remote attackers to cause a denial of service (application crash) when LIST or LSUB is sent b…

  • Medium 5.9

    Junos OS and Junos OS Evolved: In a BGP multipath scenario, when one of the contributing routes is flapping often and rapidly, rpd may crash

    A Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in the Routing Protocol Daemon (rpd) of Juniper Networks Junos OS and Junos OS Evolved allows an unauthenticated attacker with an established BGP session to cause a Denial of Service (DoS). In …

  • Medium 5.9

    Junos OS and Junos OS Evolved: Due to a race condition the rpd process can crash upon receipt of a BGP update message containing flow spec route

    A Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in Routing Protocol Daemon (rpd) of Juniper Networks Junos OS, Junos OS Evolved allows a network-based unauthenticated attacker to cause a Denial of Service (DoS). When a BGP flow route with re…

  • High 8.4
  • Low —

    etcd vulnerable to TOCTOU of gateway endpoint authentication

    ### Vulnerability type Authentication ### Workarounds Refer to the [gateway documentation](https://github.com/etcd-io/etcd/blob/master/Documentation/op-guide/gateway.md). The vulnerability was spotted due to unclear documentation of how the gateway handles en…

  • Medium 4.7
    CVE-2022-29800 Public exploit

    A time-of-check-time-of-use (TOCTOU) race condition vulnerability was found in networkd-dispatcher. This flaw exists be…

  • Medium 6.1

    Dell BIOS contains a race condition vulnerability. A local attacker could exploit this vulnerability by sending malicio…

  • Medium 6.0

    Cisco Nexus Dashboard Privilege Escalation Vulnerabilities

    Multiple vulnerabilities in Cisco Nexus Dashboard could allow an authenticated, local attacker to elevate privileges on an affected device. These vulnerabilities are due to insufficient input validation during CLI command execution on an affected device. An a…

  • Medium 6.0

    Cisco Nexus Dashboard Privilege Escalation Vulnerabilities

    Multiple vulnerabilities in Cisco Nexus Dashboard could allow an authenticated, local attacker to elevate privileges on an affected device. These vulnerabilities are due to insufficient input validation during CLI command execution on an affected device. An a…

  • Medium 6.0

    Cisco Nexus Dashboard Privilege Escalation Vulnerabilities

    Multiple vulnerabilities in Cisco Nexus Dashboard could allow an authenticated, local attacker to elevate privileges on an affected device. These vulnerabilities are due to insufficient input validation during CLI command execution on an affected device. An a…

  • Medium 6.0

    Cisco Nexus Dashboard Privilege Escalation Vulnerabilities

    Multiple vulnerabilities in Cisco Nexus Dashboard could allow an authenticated, local attacker to elevate privileges on an affected device. These vulnerabilities are due to insufficient input validation during CLI command execution on an affected device. An a…

  • High 7.0

    This vulnerability allows local attackers to escalate privileges on affected installations of Parallels Access 6.5.4 (3…

  • High 7.8

    This vulnerability allows local attackers to escalate privileges on affected installations of Parallels Desktop 16.5.0 …

  • Medium 6.2

    A possible race condition vulnerability in score driver prior to SMR Jul-2022 Release 1 can allow local attackers to in…