A local user can reach root on Debian and Ubuntu through needrestart, the tool that runs after apt and dpkg to report which services need a restart, according to Armaan Sandhu’s write-up of CVE-2026-124757. Ubuntu has fixes for every release it lists, and Debian’s advisories cover Debian 13.
Sandhu posted the write-up to the oss-security mailing list on 17 November, after the disclosure date agreed with the Linux distributions. Red Hat assigned the CVE. Sandhu confirmed root in a lab on Debian 12 (needrestart 3.6-4+deb12u3) and Ubuntu 24.04 (3.6-7ubuntu4.5), with root as the only target.
Debian 13 (3.11-1) is partly affected. A local user can make needrestart treat their process as root’s session, and the packaged hook then runs notify-send as root with a display and text the attacker picks. Sandhu didn’t reproduce command execution there.
How the attack works
needrestart works out which login session a process belongs to by matching text in the process’s cgroup path, the systemd record of where a process sits in the service tree. The match wasn’t anchored to the start of the path. A user can create a directory inside their own [email protected] cgroup with a name that looks like root’s session, and needrestart files their process under root.
The notification hook, 400-notify-send, then uses that process’s name, which the process sets for itself. On Debian 12 and Ubuntu 24.04 the hook pastes the name into a shell command that su runs as root, so a name carrying shell syntax runs as root. Any apt or dpkg run as root with the stock apt hook starts needrestart afterwards. Sandhu tested with apt-get and didn’t test unattended-upgrades.

Upstream notes the hook runs whenever needrestart runs, so systems that call it from automation or monitoring can be affected too. The script checks for /usr/bin/notify-send first and exits at once if it isn’t there. That program comes from the libnotify-bin package.

Who has a fix
Upstream maintainer Thomas Liske reviewed a three-patch fix and tagged needrestart 3.11.1 on 17 November. The patches pass the notification text to the hook through environment variables, anchor the systemd cgroup matches, and replace non-printable characters in process names with question marks. Sandhu says the second patch doesn’t apply cleanly to the 3.6 series and needs a backport.
Ubuntu published USN-9151-1 on 18 November and rates the issue High. The fixed versions are 3.11-1ubuntu2.26.10.1 on 26.10, 3.11-1ubuntu2.26.04.1 on 26.04 LTS, 3.6-7ubuntu4.6 on 24.04 LTS and 3.5-5ubuntu2.6 on 22.04 LTS. The fixes for 20.04 LTS and 18.04 LTS come through Ubuntu Pro.
Debian published DSA 6637-1 on 18 November with version 3.11-1.1~deb13u1 for Debian 13. That update carried a regression from an incorrect backport in how notify-send reaches a user session over dbus, and DSA 6637-2 on 19 November replaced it with 3.11-1.1~deb13u2. Neither advisory lists a Debian 12 package.

Switching the hook off
The hook script exits with a “disabled in global config” message when NR_NOTIFYD_DISABLE_NOTIFY_SEND is set to 1. Security firm Corgea’s write-up puts that setting in /etc/needrestart/notify.conf as the mitigation until a fixed package is installed:
echo "NR_NOTIFYD_DISABLE_NOTIFY_SEND='1'" | sudo tee -a /etc/needrestart/notify.conf
needrestart still lists services that need a restart with the hook off. Desktop users lose its restart pop-up. Sandhu’s timeline has the flaw reported to upstream on 23 October, to the Debian and Ubuntu security teams on 5 November and to the linux-distros list on 8 November.
Discover more from Sulat AI & Tech News
Subscribe to get the latest posts sent to your email.




