On November 25, 2026, Debian published Debian Security Advisory (DSA) DSA-6661-1 for the shadow package in Debian 13 "trixie". It fixes CVE-2026-135901, a flaw in the newuidmap and newgidmap tools that lets a local user damage a file. The shadow developers shipped the fix in shadow 4.20.4 on November 22, 2026.
What it means
Shadow is a set of small programs that Linux uses to manage user accounts and groups. Two of them, newuidmap and newgidmap, let ordinary users run programs in a separate, closed-off space. They do this without administrator rights.
Picture a clerk who checks that a filing cabinet is the right one, but never looks at the page inside. Someone has secretly swapped that page for another one. The clerk writes a short note on it anyway. The wrong page is now damaged.
The flaw works in a similar way. A person who already has an account on the computer can trick these tools into writing a few letters over the start of a file that this person picks. A damaged file can stop a program or service from working. Nobody can do this from the internet. The attacker needs an account on the machine.
Debian is one of the many versions of Linux. Computers that run Debian 13 are affected, and a fix is ready for them. Debian 12 is also listed as affected, but on November 27, 2026, it had no fix yet. The risk is highest on computers where other people can log in.
On Debian 13, install the latest updates with your normal update tool, and you are done. On other versions of Linux, install the updates when they arrive.
Back to topHow to use it
Debian 13 "trixie" gets the fixed version 1:4.17.4-2+deb13u1. Debian asks all users to upgrade their shadow packages.
Install the update on Debian
sudo apt update && sudo apt upgrade
This refreshes the package lists and then installs every available update, the shadow fix included.
Check the installed version
apt policy passwd
This prints the installed version and the candidate version of the passwd package.
Use this check as a quick hint, not as proof. The advisory does not list the binary packages that come from the shadow source package. It also does not say which one holds newuidmap and newgidmap. On trixie, compare the version you see with 1:4.17.4-2+deb13u1. When apt upgrade finds nothing more to install, you have everything Debian has released.
Status per Debian release
The Debian Security Tracker showed this status on November 27, 2026:
| Release | Version | Status |
|---|---|---|
| Debian 13 "trixie" | 1:4.17.4-2+deb13u1 | Fixed |
| sid (unstable) | 1:4.20.4-1 | Fixed |
| forky (testing) | 1:4.20.3-1 | Vulnerable |
| Debian 12 "bookworm" | 1:4.13+dfsg1-1+deb12u2 | Vulnerable, no fixed version listed |
The tracker shows no fix for Debian 12 "bookworm". If you run bookworm, keep installing updates and watch the tracker page for changes.
Forky is a different case. Its current version is still marked as vulnerable, while sid already carries the fixed one.
Other distributions
Red Hat assigned the CVE and tracks the issue in its bug 2583156. For Red Hat, Fedora, Ubuntu and other distributions, look at the security pages of your own distribution to find the fixed version.
If you build shadow from source, upgrade to shadow 4.20.4.
Back to topHow it works
newuidmap and newgidmap write user ID (UID) and group ID (GID) mappings for a process in a user namespace. Unprivileged users call them, and the tools then perform a privileged write. The reporter's proof of concept targeted a SUID-root build of newgidmap.
The flaw
The tools receive a directory file descriptor for /proc/<pid>/. They first compare device numbers to confirm that this descriptor is on procfs. Next, they open a child file such as setgroups by name, relative to that descriptor. Then they write mapping data into it.
Only the directory goes through the device check. The later open-by-name never repeats it. This is a check-then-use problem, similar to a TOCTOU (time-of-check to time-of-use) bug.
To exploit it, an unprivileged local user combines user and mount namespaces. The attacker bind-mounts a file of their choice over the expected child path. The directory still passes the device check. Path resolution, however, follows the bind mount, so the write lands in the attacker's chosen file. Its first five bytes become deny followed by a newline.
Debian classifies the impact as a local denial of service. Red Hat calls it local file corruption.
The upstream fix
Alejandro Colomar released shadow 4.20.4 on November 22, 2026. The fix has two parts:
- The tools now resolve the path with
openat2(2)and theRESOLVE_NO_XDEVflag. This flag stops resolution from crossing mount points, so the open no longer follows a bind mount. - The
fd:Nargument form is gone. That removes the affected way of passing the descriptor.
The original report suggested two options. One was to call fstat on the opened setgroups descriptor. The other was openat2 with RESOLVE_NO_XDEV, which upstream picked.
Disclosure
The reporter, Dickson, encrypted the report before sending it. Yet it linked to a public gist that already contained the report and a proof of concept. Colomar said the team still kept the issue under embargo. He added that the bug was not too critical and that the link may have gone unnoticed. A Red Hat developer who posts as ipedrosa wrote that Red Hat opened the CVE. In that developer's view, no embargo was needed, since the link was already public.
Other changes in 4.20.4
The release also fixes several regressions:
- A build error in
nscd.h, introduced in 4.20.3. - A
chfnerror message that could never appear, since 4.20.0. chpasswdignored the chroot and prefix settings for/etc/login.defs, since 4.12.- A
groupmodsyslog message named the wrong database, since 4.1.3.
Debian tracking
Debian bug 1154946 tracks the issue. Salvatore Bonaccorso issued DSA-6661-1. Trixie received 1:4.17.4-2+deb13u1, and sid moved to the upstream release as 1:4.20.4-1.
Still unclear:
- It is not yet confirmed whether bookworm is really affected, or whether a fix for it is pending.
- The sources give no Common Vulnerability Scoring System (CVSS) score.
- Fixed package versions for Red Hat, Fedora, Ubuntu and other distributions were not checked for this article.
Sources
- DSA-6661-1 shadow - security update — Debian Security Announce
- CVE-2026-135901 — Debian Security Tracker
- Re: Re: [PATCH v7 0/2] shadow: Security fix for newgidmap(1) — oss-security (seclists.org)
- Re: [PATCH v7 0/2] shadow: Security fix for newgidmap(1) — oss-security (seclists.org)
- shadow 4.20.4 release — shadow-maint on GitHub
