Skip to content
shellhacks.dev
Security

Linux Command Line Security Fixes From November 2026

The November 2026 fixes that reach the Linux command line: APT, needrestart, shadow newuidmap, zlib and libzstd, with fixed versions and an upgrade order.

8 min read
Summarize in AI
Illustration for "Linux Command Line Security Fixes From November 2026": a terminal session, a magnifier over matching lines, gears.

November 2026 was busy for the tools that sit under every shell session. OpenSSH shipped an emergency release for an actively exploited login bypass, APT fixed a bug that let a man in the middle swap a verified package, and needrestart, the helper that runs after every apt upgrade on Debian and Ubuntu, turned out to be a route to root. Behind those came smaller fixes in shadow's newuidmap, zlib and libzstd.

This post lists each one with the fixed package versions from the Debian and Ubuntu trackers, the check to run on a host, and the order to patch in. OpenSSH has its own post, SSHole OpenSSH password bypass on Alpine and how to fix it, so it appears here only in the summary table.

The month at a glance

ComponentCVEImpactFixed in (Debian 13 trixie)Source
OpenSSH (musl, no PAM)CVE-2026-123158Remote login without a passwordNot affected; Alpine and 10.6p2OpenSSH 10.6p2
APTCVE-2026-109518Root code execution by an on-path attacker3.0.4DSA-6607-1
needrestartCVE-2026-124757Local user to root3.11-1.1~deb13u2DSA-6637-1, DSA-6637-2
shadow (newuidmap, newgidmap)CVE-2026-135901Local file corruption1:4.17.4-2+deb13u1DSA-6661-1
zlibCVE-2026-27171, CVE-2026-76844, CVE-2026-85091Denial of service, possibly code execution1:1.3.dfsg+really1.3.1-1+deb13u1DSA-6613-1
libzstdCVE-2026-124851Information disclosure1.5.7+dfsg-1+deb13u1DSA-6657-1

Nothing in November touched bash, coreutils, sudo, glibc or util-linux in Debian's security announcements for the month, and the CISA Known Exploited Vulnerabilities additions for November include no Linux userland tool other than OpenSSH. If a scanner reports a November CVE against one of those packages, read the tracker entry before trusting it.

APT can install a package it never verified

CVE-2026-109518 is the most serious bug on the list for Debian and Ubuntu machines, and the least obvious. APT downloads .deb files over plain HTTP on many mirrors and relies on signed Release and Packages files to check every download. That model is supposed to make the transport irrelevant: a mirror or a proxy can be hostile and the worst it can do is refuse to serve.

Max Justicz found a way round it. The APT maintainers' advisory describes it as a verification bypass using HTTP redirects plus transient server errors that make APT retry. When two downloads end up with the same URI after a redirect, APT merges them, and the file handling on the retry path reuses a hard link. An attacker who controls the HTTP traffic can use that to put a chosen payload in place after the real file has been verified. Debian's advisory says the result is arbitrary code execution as root, which follows from the fact that maintainer scripts in a .deb run as root on install.

The precondition is a non-zero Acquire::Retries. The tracker notes that 3 is the default from Debian 12 and Ubuntu 22.04 onward, so every current release is exposed in its default configuration, and older releases are exposed only if someone set retries in a config file. The attacker needs to be on the path: a malicious mirror, a compromised proxy, or someone on the same network when the mirror is plain HTTP.

Check the installed version:

Shell
dpkg-query -W -f='${Package} ${Version}\n' apt
Text
apt 3.0.3

That is a trixie host one release short of the fix. The fixed versions are:

ReleaseFixed apt version
Debian 13 trixie3.0.4
Debian 12 bookworm2.6.2 (DLA-4880-1)
Ubuntu 26.043.2.1ubuntu0.1
Ubuntu 24.04 LTS2.8.4ubuntu0.1
Ubuntu 22.04 LTS2.4.15ubuntu0.1

Those Ubuntu versions come from Ubuntu's CVE page, which links the fix to USN-8996-1.

Patching APT with APT is fine here: the bug needs a hostile network in the middle of the transfer, so run the upgrade from a network you trust, against an HTTPS mirror if you have one. If a host cannot be upgraded right away, setting retries to zero removes the precondition the tracker names. Put it in its own file so it is easy to remove later:

/etc/apt/apt.conf.d/99-no-retriesText
Acquire::Retries "0";

Confirm APT has read it:

Shell
apt-config dump Acquire::Retries
Text
Acquire::Retries "0";

The cost is that a flaky mirror now fails an install instead of retrying it. Delete the file once the fixed APT is in place.

The same update bundles fixes for several out-of-bounds reads in APT's .deb and deb822 parsers. The maintainers rate those as denial of service at most, mainly for root daemons such as PackageKit that parse user-supplied .deb files.

needrestart turns a process name into a root shell

needrestart is the tool that prints "Daemons using outdated libraries" after an upgrade and offers to restart them. On Debian and Ubuntu it runs from an APT hook, /etc/apt/apt.conf.d/99needrestart, so it runs as root every time anyone runs apt or dpkg. That makes it a prized target. November's bug, CVE-2026-124757, is not the first local root found in it: Qualys reported several in 2024.

The reporter, Armaan Sandhu, explained the mechanism in the oss-security disclosure on 17 November. needrestart works out which user session a process belongs to by matching text in the process's cgroup path, and the match is not anchored. A local user can create a directory inside their own [email protected] cgroup whose name makes their process look like part of root's session. The notify hook, 400-notify-send, then uses that process's name, which the process sets itself, and on Debian 12 and Ubuntu 24.04 the hook pastes the name into a shell string run through su. A root shell parses it, and the attacker's text runs as root.

On Debian 13 the reporter could make needrestart treat the process as root's and get notify-send run as root with attacker-chosen text, but did not reproduce command execution. Debian fixed trixie anyway. The upstream fix is a three-patch series: notification text goes to the hook through environment variables instead of a shell string, the cgroup matches are anchored, and non-printable characters are replaced.

Check what you have:

Shell
dpkg-query -W -f='${Package} ${Version}\n' needrestart
Text
needrestart 3.6-7ubuntu4.5

That is the Ubuntu 24.04 package the report confirmed as vulnerable. The fixed versions, from the Debian tracker and Ubuntu's CVE page:

ReleaseFixed needrestart version
Debian 13 trixie3.11-1.1~deb13u2
Debian 12 bookworm3.6-4+deb12u4 (DLA-4921-1)
Ubuntu 26.043.11-1ubuntu2.26.04.1
Ubuntu 24.04 LTS3.6-7ubuntu4.6
Ubuntu 22.04 LTS3.5-5ubuntu2.6

On trixie, take deb13u2, not deb13u1. Debian's second advisory, DSA-6637-2, replaced the first fix after an incorrect backport broke notify-send notifications to user sessions over D-Bus.

The risk is local, so it matters most on machines where people other than the administrators have a shell: shared build hosts, university servers, jump boxes, and any host where a web application runs code as its own user. If you cannot upgrade yet, removing needrestart is a safe stopgap. It only advises on restarts and nothing depends on it at runtime:

Shell
apt-get remove needrestart

The trade-off is that services keep running old library code after upgrades until someone restarts them by hand, which matters for the zlib and libzstd fixes below.

newuidmap can be pointed at the wrong file

newuidmap and newgidmap are the setuid helpers from the shadow package that let an unprivileged user set up the ID mappings for a user namespace. Rootless Podman, rootless Docker and unprivileged LXC all depend on them. CVE-2026-135901 is in how they find the file to write.

The tracker description is precise. The helpers take a file descriptor from the caller, check it refers to a directory on /proc by comparing device numbers, and then open the mapping file by name relative to that directory. A local user with user and mount namespaces can bind-mount a file of their choice over the expected path. The device-number check still passes, and the helper overwrites the first five bytes of the chosen file with fixed content. Debian's advisory classes the result as local denial of service through file corruption.

Debian 13's shadow 1:4.17.4-2+deb13u1 fixes it. Debian 12 is not affected, because the vulnerable code arrived in a later upstream version. Check the version on a trixie host:

Shell
dpkg-query -W -f='${Package} ${Version}\n' uidmap
Text
uidmap 1:4.17.4-2

The helpers ship in the uidmap binary package, built from the shadow source, so that is the name to query and to upgrade. A host that does not have uidmap installed has no setuid newuidmap to abuse.

zlib and libzstd

These two are libraries rather than commands, but nearly every command-line tool links one of them: curl, git and APT itself all link zlib, and APT links libzstd too. Debian fixed three zlib CVEs in DSA-6613-1 on 7 November, rated as denial of service or possibly code execution when processing crafted input, and a libzstd buffer-management bug, CVE-2026-124851, in DSA-6657-1 on 24 November, rated as information disclosure.

The catch with library fixes is that upgrading the package changes the file on disk and nothing else. Every running process keeps the old copy mapped until it restarts. On a host with needrestart patched, its prompt after the upgrade lists exactly those processes. Without it, look for processes still mapping a deleted copy of the library:

Shell
grep -l 'libz.so.1.*(deleted)' /proc/[0-9]*/maps 2>/dev/null
Text
/proc/812/maps
/proc/1430/maps

The process ids will differ on your machine. Each path names a process that still has the pre-upgrade zlib mapped; ps -p 812,1430 -o pid,comm tells you which services to restart.

The order to patch in

  1. Anything running Alpine or another musl distribution with sshd and password authentication on. SSHole is the one bug this month that CISA lists as exploited, and it needs no account.

  2. APT on every Debian and Ubuntu host, starting with hosts that fetch packages over plain HTTP or through a proxy you do not control.

  3. needrestart on any Debian or Ubuntu host where users other than administrators can run code. On single-tenant servers it can ride with the APT update.

  4. zlib and libzstd, followed by restarting the services that link them. A package upgrade that is never followed by a restart has not fixed anything yet.

  5. uidmap on Debian 13 hosts that run rootless containers.

On most Debian and Ubuntu machines, steps 2 to 5 are one apt-get update && apt-get upgrade followed by restarts. The order matters when you have a fleet and only a short window, or when one host class is far more exposed than the rest.

Also inLinux
Share

Keep reading

Get new posts by email

One email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.