Skip to content

GHSA-x4mc-mqm7-gg39 CVE-2026-35354

uutils coreutils has a Time-of-Check to Time-of-Use (TOCTOU) race condition

Medium crates.io
Severity
4.7 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.11%
Chance of exploitation in the next 30 days. Higher than 1.23% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition
Fix
None yet
No fixed version published

Description

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 each operation. A local attacker with write access to the directory can exploit this race to swap files between calls, causing the destination file to receive an inconsistent mix of security xattrs, such as SELinux labels or file capabilities.

Affected versions

crates.io

PackageVulnerableFixed in
coreutils
<= 0.8.0
No fix yet

How to fix

No fixed version has been published yet. Until one is, remove or replace the package, or turn off or isolate the affected feature. This page updates when a fix ships.

Severity breakdown

CVSS 3.1 4.7

CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N

Attack vector
Local
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Weakness

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

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
  • 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.
  • 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.
  • Architecture and Design: Limit the interleaving of operations on files from multiple processes.
  • 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.
  • Implementation: Recheck the resource after the use call to verify that the action was taken appropriately.
  • Architecture and Design: Ensure that some environmental locking mechanism can be used to protect resources effectively.
  • 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.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-m2pg-c7m6-77pj
uutils coreutils has an Improper Input Validation Issue in its cut Utility
Medium Also affects coreutils
GHSA-fhr3-xh3q-69w6
uutils coreutils has an Incorrect Provision of Specified Functionality Issue
Low Also affects coreutils
GHSA-5pv5-xh52-hvrp
uutils coreutils has an Incorrect Short Circuit Evaluation Issue
Low Also affects coreutils
GHSA-5v4g-vw9x-h534
uutils coreutils has an Improper Input Validation Issue in its env Utility
Low Also affects coreutils
GHSA-6g8r-74qp-6859
uutils coreutils has a Time-of-check Time-of-use (TOCTOU) Race Condition
Medium Also affects coreutils
GHSA-vx9m-xjwf-8cqm
uutils coreutils has an Improper Handling of Unicode Encoding Issue
Low Also affects coreutils
GHSA-4wrp-79m8-9m9p
uutils coreutils has a Time-of-check Time-of-use (TOCTOU) Race Condition
Medium Also affects coreutils
GHSA-wq63-vh5h-pr5p
uutils coreutils has a UNIX Symbolic Link (Symlink) Following issue
Medium Also affects coreutils
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor