Skip to content

GHSA-mh5c-xrmh-m794 CVE-2026-35368

uutils coreutils has an Untrusted Search Path

High crates.io
Severity
7.8 / 10
High · CVSS 3.1
Exploit chance (EPSS)
0.14%
Chance of exploitation in the next 30 days. Higher than 3.04% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-426 Untrusted Search Path
Fix
None yet
No fixed version published

Description

A vulnerability exists in the chroot utility of uutils coreutils when using the --userspec option. The utility resolves the user specification via getpwnam() after entering the chroot but before dropping root privileges. On glibc-based systems, this can trigger the Name Service Switch (NSS) to load shared libraries (e.g., libnss_*.so.2) from the new root directory. If the NEWROOT is writable by an attacker, they can inject a malicious NSS module to execute arbitrary code as root, facilitating a full container escape or privilege escalation.

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 7.8

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

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

Weakness

CWE-426: Untrusted Search Path

The product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control.

How to prevent it
  • Architecture and Design, Implementation: Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
  • Implementation: When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.
  • Implementation: Remove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.
  • Implementation: Check your search path before use and remove any elements that are likely to be unsafe, such as the current working directory or a temporary files directory.
  • Implementation: Use other functions that require explicit paths. Making use of any of the other readily available functions that require explicit paths is a safe way to avoid this problem. For example, system() in C does not require a full path since the shell can take care of it, while execl() and execv() require a full path.

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