Back to Newsroom

Threat intel5 min read

Netkit telnetd flaw can give root without a password on Debian, Ubuntu and Kali

CVE-2026-141380 lets an unauthenticated Telnet client set environment variables on the server. With one file planted on the host, that can mean a root shell. Debian has no fixed package yet.

4Tify Team

Netkit telnetd flaw can give root without a password on Debian, Ubuntu and Kali

A newly disclosed flaw in netkit telnetd, CVE-2026-141380, lets a client that has not logged in set environment variables on the server in the first moments of a Telnet connection. On some setups that is enough for a root shell without a password. Debian lists the affected packages as vulnerable, with no fixed version yet.

What happened

The issue was made public on 2 December 2026, and Debian opened bug #1156205 the same day with severity "grave". The flaw sits in a Debian patch (124-support_uservar.diff) that builds netkit telnetd 0.17 with ACCEPT_USERVAR. When a client sends variables through the Telnet NEW-ENVIRON option and marks them as user variables, the server sets them without checking its allow-list.

This happens during option negotiation, before any login prompt appears. The login process inherits the variables, and the setuid-root telnetlogin helper passes them on to /bin/login.

Who is affected

Debian's security tracker marks the netkit-telnet-ssl source package vulnerable in bookworm (0.17.41+really0.17-3), trixie (0.17.41+really0.17-6) and sid (0.17.41+really0.17-8), and lists netkit-telnet as unfixed too. These sources build the telnetd and telnetd-ssl packages.

The attack has been shown working end to end on Debian 13 "trixie", Ubuntu 25.04 and 25.10, and Kali Linux rolling, which build from the same Debian source. Gentoo's net-misc/netkit-telnetd applies Debian's patch series, and its shipped xinetd config runs the daemon as root.

Debian 11 "bullseye" accepts the injected variables, but its util-linux 2.36 login lacks the feature the passwordless route needs.

GNU inetutils telnetd is a separate codebase. Its fix for the related CVE-2026-28372 does not cover netkit.

How it works

There are two routes, depending on how the daemon runs.

If telnetd runs as root (older inetd entries, systemd units without a User= line, Gentoo's default), there is no privilege change, so glibc honours LD_PRELOAD. Point it at a shared library placed on the machine and that code runs as root inside /bin/login, before authentication. The CVSS 3.1 score of 9.8 published with the disclosure applies to this route.

Debian's own inetd entry runs telnetd as a non-root user, which makes glibc drop LD_* variables. The second route works there. util-linux login 2.40 and later reads CREDENTIALS_DIRECTORY; if a file named login.noauth in that directory contains yes, it skips the password check. With CREDENTIALS_DIRECTORY pointing at a folder that holds the file and USER set to root, the result is a root shell with no prompt.

Both routes need one attacker-controlled file on the target: a shared library, or a three-byte login.noauth. An open Telnet port alone is not enough. An upload bug, a path traversal, an archive extracted to a predictable path or a low-privilege account already on the box would fill that gap and turn a small foothold into full root.

There are no reports of attacks using the flaw so far.

What to do now

  • Find every Telnet server you run. dpkg -l | grep -i telnetd lists the packages; also check inetd.conf, xinetd and systemd socket units, because inetd-style listeners don't show up as a running process. ss -ltnp | grep ':23' shows what is listening.
  • If you don't need it, remove it (apt purge telnetd telnetd-ssl) and use SSH.
  • If an old device or application still needs Telnet, allow TCP port 23 only from a management network, never from the internet.
  • Running the daemon as a non-root user blocks the LD_PRELOAD route but not the login.noauth one, so on its own it is not a fix.
  • Watch the Debian security tracker entry and your distribution's notices for a package that names CVE-2026-141380. The proposed fixes (restoring the allow-list or dropping ACCEPT_USERVAR) had not shipped as of 3 December 2026. The CVE record is on NVD.

Forgotten Telnet listeners tend to live on in old servers and appliances long after everyone assumes they are gone. Our Attack Surface Management service keeps an inventory of the ports and services your hosts expose to the internet and flags legacy ones like this, so you know where to look before a fix lands.

NEWSLETTER

The week’s news,
every Friday.

A short email with what we published that week. You can unsubscribe from any of them.

FRIDAY DIGEST · SAMPLE4TIFY NEWSROOM

This week in security

  • 01Public exploit out for vBulletin flaw that needs no login
  • 02EAGERBEE, ShadowRelay and PhantomNet backdoors hit Russia and Belarus
  • 03European Commission IT outage leaves staff without VPN and email

+ 6 MORE IN THIS ISSUE · UNSUBSCRIBE IN ONE CLICK

ONE OFFER

More than one product?
Get one offer.

Tell us what you need to protect and your budget, monthly or yearly. We combine the products into one offer and one contract, sized to that budget, and we stay with you after it is signed.

Ask for an offer Just tell us how many assets you have and what you want to spend.