CVE-2026-135901

Shadow-utils: shadow-utils: newgidmap and newuidmap improperly validate file descriptor location, allowing local file corruption via bind mount

Published Dec 1, 2026 CVSS 3.1 · 4.4 Medium EPSS n/a KEV · Not listed
Description
A flaw was found in shadow-utils. The newgidmap and newuidmap utilities validate that a caller-supplied file descriptor refers to a directory on the /proc filesystem by comparing device numbers, then open a file by name relative to that directory to write privileged group/user ID mapping data. A local, unprivileged user can use Linux user and mount namespaces to bind-mount an attacker-chosen file over the expected path, defeating the device-number check and causing the helper to overwrite the first five bytes of the attacker-chosen file with fixed content.

Analysis

AI-generated

Technical impact

The flaw in shadow-utils’ newgidmap and newuidmap utilities allows a local, unprivileged user to bind‑mount an attacker‑chosen file over the expected /proc directory path used by the helper. The utilities perform a device-number check on the supplied file descriptor then open a file within that directory to write mapping data. By intercepting the path with a bind mount, the attacker defeats the check and causes the helper to overwrite the first five bytes of the target file with fixed content, corrupting data on the local system. This weakness is a classic example of improper handling of file descriptors leading to unauthorized file modification (CWE‑59).

Affected Systems

Red Hat Enterprise Linux 10, 6, 7, 8, 9, Red Hat Hardened Images, and Red Hat OpenShift Container Platform 4 and 5 all ship the vulnerable shadow-utils setuid binaries that expose newgidmap and newuidmap to privileged operations.

Risk and Exploitability

The CVSS score of 4.4 indicates moderate severity, and the EPSS score is not available; this vulnerability is not listed in the CISA KEV catalog. It can be exploited by any local process that can create unprivileged user namespaces and bind‑mount an arbitrary file. Successful exploitation requires the presence of the setuid-root newgidmap/newuidmap binaries, but the attacker does not need elevated privileges at launch. The workaround provided by Red Hat is to disable the creation of unprivileged user namespaces (e.g., set sysctl user.max_user_namespaces to 0), which prevents the required namespace creation.

Remediation

Vendor Workaround

Disabling the creation of unprivileged user namespaces (for example, by setting the sysctl user.max_user_namespaces to 0) prevents the creation of the namespaces required to carry out this attack. This can affect functionality that relies on unprivileged user namespaces, such as rootless containers, so it should be tested before being applied broadly. Red Hat Enterprise Linux 10 is not expected to require this mitigation, since newgidmap and newuidmap are not installed setuid-root on these releases.


OpenCVE Recommended Actions

  • Update the shadow-utils package to version 4.20.4 or newer using the vendor’s package manager so that the directory validation logic is corrected.
  • Disable creation of unprivileged user namespaces by setting sysctl user.max_user_namespaces to 0; evaluate functionality before broad deployment to avoid impact on rootless containers.
  • Remove the setuid bit from the newgidmap and newuidmap binaries to ensure they run with the invoking user's privileges, thereby eliminating the privilege escalation path.

Generated by OpenCVE AI on December 2, 2026 at 00:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description A flaw was found in shadow-utils. The newgidmap and newuidmap utilities validate that a caller-supplied file descriptor refers to a directory on the /proc filesystem by comparing device numbers, then open a file by name relative to that directory to write privileged group/user ID mapping data. A local, unprivileged user can use Linux user and mount namespaces to bind-mount an attacker-chosen file over the expected path, defeating the device-number check and causing the helper to overwrite the first five bytes of the attacker-chosen file with fixed content.
Title Shadow-utils: shadow-utils: newgidmap and newuidmap improperly validate file descriptor location, allowing local file corruption via bind mount
First Time appeared Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
Redhat rhel Els
Weaknesses CWE-59
CPEs cpe:/a:redhat:hummingbird:1
cpe:/a:redhat:openshift:4
cpe:/a:redhat:openshift:5
cpe:/o:redhat:enterprise_linux:10
cpe:/o:redhat:enterprise_linux:8
cpe:/o:redhat:enterprise_linux:9
cpe:/o:redhat:rhel_els:6
cpe:/o:redhat:rhel_els:7
Vendors & Products Redhat
Redhat enterprise Linux
Redhat hummingbird
Redhat openshift
Redhat rhel Els
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

Sources

Status
PUBLISHED
Assigner
redhat
Published
Updated
Dec 1, 2026, 3:45 PM
Reserved
Nov 24, 2026, 11:53 AM
Status
Awaiting Analysis
Published
Dec 1, 2026, 3:17 PM
Modified
Dec 1, 2026, 4:18 PM