---
title: shadow-utils 4.20.4 fixes a local newgidmap/newuidmap bug that could overwrite the first five bytes of a root-owned file | ctxsec
url: https://ctxsec.com/items/shadow-utils-4-20-4-newgidmap-newuidmap-fd-n-local-file-overwrite
description: "Maintainer Alejandro Colomar released shadow 4.20.4 after a one-week embargo. An unprivileged user could get the setuid newgidmap helper to write \"deny\\n\" over the start of a chosen root-owned file. The reporter called it a local integrity or denial-of-service issue, not code execution."
status: "primary (shadow-utils 4.20.4 release and maintainer post to oss-security, Nov 22, 2026)"
published: 2026-11-22
---

> Maintainer Alejandro Colomar released shadow 4.20.4 after a one-week embargo. An unprivileged user could get the setuid newgidmap helper to write "deny\n" over the start of a chosen root-owned file. The reporter called it a local integrity or denial-of-service issue, not code execution.

[← Cybersecurity News](/news) · [markdown](/items/shadow-utils-4-20-4-newgidmap-newuidmap-fd-n-local-file-overwrite.md)

primary (shadow-utils 4.20.4 release and maintainer post to oss-security, Nov 22, 2026)

2026-11-22 8:47 PM ET

### shadow-utils 4.20.4 fixes a local newgidmap/newuidmap bug that could overwrite the first five bytes of a root-owned file

- The `newgidmap fd:N` path checked that a caller-supplied directory file descriptor was on procfs, then opened `setgroups` relative to it as root and wrote `deny\n`. Maintainer Alejandro Colomar, posting the original report from Dickson Wu of Certik, says an unprivileged user in their own user and mount namespace could arrange for that write to land on a different root-owned file while still passing the device check.
- Mapping the caller's own GID was enough to reach the write, so no subgid entry was required. The reporter described a fixed five-byte write at offset 0 and called it a local integrity or denial-of-service issue rather than code execution.
- The 4.20.4 release, published Nov 22 after a one-week embargo, uses `openat2(2)` so the helper will not follow symlinks or bind mounts, and it drops the `fd:N` interface. The same change applies to `newuidmap`.
- The advisories do not assign a CVE. Action: upgrade shadow-utils to 4.20.4, or apply the maintainer's patches to 4.20.3, and prefer distro packages once they ship.

Sources: [oss-security: Alejandro Colomar, shadow 4.20.4 and newgidmap security fix (Nov 22, 2026)](https://seclists.org/oss-sec/2026/q4/819) · [shadow-maint/shadow release 4.20.4 (Nov 22, 2026)](https://github.com/shadow-maint/shadow/releases/tag/4.20.4)
