Skip to content
Critical Telnetd Vulnerability Allows Hackers to Execute Remote Code With Root Privileges

Critical Telnetd Vulnerability Allows Hackers to Execute Remote Code With Root Privileges

Gbhackers •Divya • December 3, 2026

A significant pre-authentication vulnerability in the netkit telnetd implementation allows remote, unauthenticated attackers to inject arbitrary environment variables, potentially leading to root-level code execution on affected Linux systems.

This issue, tracked as CVE-2026-141380, impacts the telnetd and telnetd-ssl packages provided by Debian and various downstream distributions, including Ubuntu, Kali, and Gentoo. In its most severe configuration, this vulnerability has been assigned a CVSS 3.1 score of 9.8.

Telnetd Vulnerability

The bug sits in Debian’s patch series, which builds netkit telnetd 0.17 with the ACCEPT_USERVAR flag. Patch 124-support_uservar.diff changes the NEW-ENVIRON suboption handler in telnetd/state.c so that any variable the client marks as USERVAR is passed straight to setenv().

The client controls that flag, so the envvarok() whitelist is fully bypassed. This follows the same pattern as the earlier GNU InetUtils authentication bypass , where an unsanitized USER value gave attackers root access.

The injection happens during the initial Telnet option negotiation, before startslave() forks the login child. The child process inherits the poisoned environment. The setuid-root telnetlogin wrapper then forwards it to /bin/login and checks only the values of TERM and REMOTEHOST.

When the daemon runs as root, as it does with legacy inetd entries and Gentoo’s shipped xinetd config, AT_SECURE is never set and glibc honors LD_PRELOAD. A shared object supplied by the attacker then runs its constructor as root inside /bin/login before any authentication takes place.

Debian’s default non-root inetd entry is also exposed. In this setup glibc strips LD_* variables, but CREDENTIALS_DIRECTORY is left in place. The login tool in util-linux 2.40 and later skips PAM entirely if a login.noauth file in that directory contains “yes”.

Each attack path needs one file on the target that the attacker can write to. That file can come from a path traversal bug, zip-slip during archive extraction, an existing webshell, or a compromised CI runner. On servers that are already breached, the planted .so file runs again as root on every new connection to port 23, which gives attackers lasting persistence.

Researcher Liad Levy confirmed full exploitation on Debian 13 trixie, Ubuntu 25.04 and 25.10, and Kali rolling. Debian source package “telnet” 0.17-42 and earlier is vulnerable, and the ACCEPT_USERVAR build dates back to 2015. Debian 11 bullseye is affected by the injection itself, but the login.noauth variant needs util-linux 2.40 or newer.

The suggested fixes are to revert the “|| is_uservar” relaxation in suboption(), drop ACCEPT_USERVAR entirely, or make telnetlogin enforce a whitelist on the variables it forwards.

Telnet has faced repeated scrutiny this year, including a critical telnetd buffer overflow tracked as CVE-2026-32746. Administrators should turn off telnetd wherever possible, move remote access to SSH, and block port 23 at the network edge until patched packages are available.

Join ANY.RUN and Torq to learn how TI Feeds can help your SOC detect up to 30% of malicious IOCs earlier & accelerate investigations -> Attend Free Live Webinar

Artificial Intelligence

Cyber security Course

Cyber Security Resources

Cybersecurity

Information Gathering

Information Security Risks

Critical WatchGuard Endpoint Security Flaw Enable Remote Code Execution on Windows PCs

Foxconn Data Breach Exposes Potential Risks to Employee Records and Manufacturing Operations

Palo Alto Warns AI-Powered Malware Can Attack Windows PCs Without Human Instructions

Hackers Use Autonomous AI to Target Perplexity and Steal Access to Advanced AI Models

OpenSSH Urges Users to Adopt Post-Quantum Cryptography to Prevent Future Decryption Attacks

NSA Urges Immediate Shift to Post-Quantum Cryptography as Hackers Harvest Encrypted Data

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

Netkit Telnetd Flaw CVE-2026-141380 Enables Root Code Execution on Debian-Based Systems Researcher Liad Levy disclosed CVE-2026-141380 on the OSS-Security list on 2 December 2026, describing a pre-authentication flaw in the netkit telnetd implementation shipped in Debian's patch series. The Debian patch 124-support_uservar.diff causes client-marked USERVAR environment variables to bypass the envvarok() whitelist and be passed to setenv(), and the setuid telnetlogin wrapper forwards them to /bin/login. One article rates the path to root code execution CVSS 3.1 9.8, while another notes the score applies to the root-execution path. Affected packages reportedly include Debian telnetd and telnetd-ssl (source package telnet 0.17-42 and earlier), along with Gentoo net-misc/netkit-telnetd; Levy reported full exploitation on Debian 13 trixie, Ubuntu 25.04 and 25.10, and Kali rolling. When the daemon runs as root, attacker-supplied LD_PRELOAD libraries may execute as root during login. Under Debian's non-root inetd entry, a login.noauth file in CREDENTIALS_DIRECTORY can cause util-linux 2.40+ to skip PAM, per one article. Exploitation requires the attacker to reach port 23 and write a file on the target, which can come from a separate file-write flaw. The disclosure reports successful lab tests; the articles do not report attacks in the wild. Suggested fixes include reverting the is_uservar relaxation, dropping ACCEPT_USERVAR, or whitelisting variables in telnetlogin, but no released patch is reported. A related GNU inetutils issue, CVE-2026-28372, is referenced as background. 4 sources 72