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.
Published: 2026-04-22
Score: 7.2 High
EPSS: < 1% Very Low
KEV: No
Impact: Privilege Escalation and Container Escape
Action: Assess Impact
AI Analysis

Impact

A vulnerable implementation of the chroot utility in uutils coreutils permits malicious code execution when an attacker‑friendly directory is used as the new root. By leveraging the --userspec option, the program resolves user names via getpwnam() after changing into the chroot but before dropping the root privilege. On glibc‑based systems the Name Service Switch (NSS) will load shared libraries from the new root, allowing an attacker to supply a forged libnss_*.so.2 that is executed as root. This flaw directly enables local privilege escalation and a potential full container escape.

Affected Systems

Uutils coreutils on glibc‑based systems is affected when a user can supply a writable NEWROOT directory and invoke chroot with the --userspec option. No specific version range is disclosed, so all releases that have not yet applied the NSS module loading fix are potentially vulnerable.

Risk and Exploitability

The CVSS score is 7.2 and the EPSS score is not available. The vulnerability is not listed in the CISA KEV catalog. The attack requires an attacker to control a writable location that can be used as the new root directory and to invoke chroot with the --userspec option. Once those conditions are met, the vulnerable code will load the attacker‑supplied NSS module before dropping privileges. Successful exploitation would give the attacker arbitrary code execution as root, enabling complete container escape or privilege escalation. The lack of an exploit score and KEV listing suggests that the vulnerability is not yet widely exploited but the potential impact is significant.

Generated by OpenCVE AI on April 27, 2026 at 08:39 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade uutils coreutils to the newest stable release that incorporates the NSS module loading fix.
  • Ensure that directories used as NEWROOT are not writable by untrusted users, reducing the chance to inject malicious NSS modules.
  • Restrict or disable the --userspec option in chroot, or configure the environment so that getpwnam() resolves users against a trusted directory that does not contain malicious NSS libraries.

Generated by OpenCVE AI on April 27, 2026 at 08:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-mh5c-xrmh-m794 uutils coreutils has an Untrusted Search Path
History

Fri, 24 Apr 2026 19:30:00 +0000

Type Values Removed Values Added
First Time appeared Uutils
Uutils coreutils
CPEs cpe:2.3:a:uutils:coreutils:-:*:*:*:*:rust:*:*
Vendors & Products Uutils
Uutils coreutils

Wed, 22 Apr 2026 18:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 22 Apr 2026 16:30:00 +0000

Type Values Removed Values Added
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.
Title uutils coreutils chroot Local Privilege Escalation and chroot Escape in via Name Service Switch (NSS) Injection
Weaknesses CWE-426
References
Metrics cvssV3_1

{'score': 7.2, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H'}


Subscriptions

Uutils Coreutils
cve-icon MITRE

Status: PUBLISHED

Assigner: canonical

Published:

Updated: 2026-04-25T03:55:34.110Z

Reserved: 2026-04-02T12:58:56.088Z

Link: CVE-2026-35368

cve-icon Vulnrichment

Updated: 2026-04-22T17:48:51.326Z

cve-icon NVD

Status : Analyzed

Published: 2026-04-22T17:16:40.560

Modified: 2026-04-24T19:18:55.670

Link: CVE-2026-35368

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-27T19:53:37Z

Weaknesses