A decade-old patch in the telnet server that Debian and its derivatives ship can let a remote stranger plant environment variables in the login process before any password is asked for, and in the right conditions that ends in a root shell. Researcher Liad Levy disclosed the bug, tracked as CVE-2026-141380, on the oss-security mailing list on December 2, and rates its worst case 9.8 out of 10.
Levy says he confirmed a pre-authentication root shell end to end on Debian 13 trixie, Ubuntu 25.04 and 25.10, and Kali rolling. Debian's security tracker currently lists the netkit-telnet-ssl package in bookworm, trixie and sid as vulnerable, with no fixed version yet. CVE program and NVD records were not yet published when this was written.
A 2015 build flag trusts the client
Telnet lets a client pass environment variables to the server while the two sides negotiate options, which happens before login. Netkit telnetd normally checks those names against an allow list. According to Levy, Debian's patch 124-support_uservar.diff, built with the ACCEPT_USERVAR option since 2015, accepts any variable the client labels as a "USERVAR", and the client controls that label. The poisoned environment is then inherited by the login child and passed through the setuid-root telnetlogin wrapper to /bin/login.
Levy describes two routes from there:
- Daemon running as root (legacy inetd entries, service units without a User= line, and Gentoo's shipped xinetd config): glibc honours an injected LD_PRELOAD, so an attacker's shared library runs as root inside /bin/login before authentication.
- Daemon running as a non-root user (Debian's shipped inetd entry): LD_ variables are stripped, but CREDENTIALS_DIRECTORY is not. With util-linux 2.40 or later, /bin/login skips PAM authentication if that directory holds a login.noauth file containing "yes". Injecting USER=root alongside it gives a root shell with no password prompt.
There is one real catch. Both routes need a single attacker-writable file on the target: a shared library for the first, a three-byte text file for the second. Levy lists ways to get one, including a separate file-write or path traversal bug, zip extraction flaws, an existing webshell, or a compromised CI runner. That makes this most dangerous as a second stage, turning a low-privilege foothold into root, or as quiet persistence on a box that still answers on port 23.
Debian 11 bullseye is affected by the injection itself, Levy notes, but its older util-linux 2.36 rules out the login.noauth route. He also says a related local-only variant of the login.noauth trick was already fixed in GNU inetutils telnetd as CVE-2026-28372, and that this finding reaches the same mechanism remotely.
Turn telnetd off until packages land
With no fixed package published, the practical fix is removal:
- Uninstall or disable telnetd and telnetd-ssl wherever they are not strictly required, and move remote administration to SSH.
- Check inetd and xinetd configurations for telnet entries, especially any running as root.
- Apply your distribution's update as soon as it ships. Levy's suggested fixes are to revert the USERVAR relaxation, drop ACCEPT_USERVAR, or have telnetlogin filter the environment it forwards.
Peru's national digital security centre also flagged the flaw in its integrated alert N° 242-2026 on December 3. The same alert covered the usb2shell Linux kernel bug, another reminder that the shortest path to root on Linux often runs through software nobody remembers is installed.
This briefing is provided by IntelFusions for informational and defensive purposes only. It is based on sources assessed to be reliable at the time of writing, and analytic judgments carry the confidence levels indicated. Indicators of compromise are defanged; re-arm them only in controlled environments. IntelFusions is not affiliated with the organizations named and makes no warranty as to completeness or accuracy.