10-Year-Old Code Commit Just Gave Attackers Root on Thousands of
A 2015 change to GNU InetUtils telnetd introduced a %U placeholder that expands the client-supplied USER environment variable into the login command without sanitisation. An attacker could send a USER value beginning with a dash to make login skip authentication and obtain a root shell without credentials.
Published on medium.com
In the ever-evolving landscape of cybersecurity, legacy protocols continue to pose significant risks. CVE-2026–24061, a critical vulnerability in GNU InetUtils telnetd (up to version 2.7–2), exemplifies this by enabling unauthenticated remote code execution (RCE) as root.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The telnetd code expands the client-controlled USER environment variable into the login command line without escaping or validating it, allowing argument injection.
Impact
An unauthenticated attacker could execute commands as root on exposed systems, and the flaw has been actively exploited.
What the attacker needed
Network access to telnetd on port 23; telnetd version up to 2.7-2; telnetd runs as root
The fix
The issue was fixed in InetUtils versions after 2.7-2, which sanitise or remove the unsafe %U handling.
How it was found
- Clone the lab repository.
- Build the Docker image.
- Run the container interactively.
- Use the printed command that sets a crafted USER value and connects with telnet.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Telnet is an old way to log in to a remote computer. This version of the telnet server builds a login command using a username the client sends, and it does not check that username for dangerous characters. By sending a username that looks like a command option, an attacker can tell the login program to skip the password check and give them full control of the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.