Skip to content
RCE Write-up Intermediate

How CVE-2026–24061 Grants Instant Root via Telnet

GNU Inetutils telnetd fails to sanitise the USER environment variable supplied during Telnet NEW-ENVIRON negotiation, allowing an attacker to inject the -f root argument into the login command. This lets an unauthenticated remote attacker obtain an immediate root shell without a password.

mhammadalkhateeb22 Follow

Published on medium.com

Although Telnet is widely regarded as a legacy protocol for remote access and command execution, it remains enabled across a surprising number of modern and legacy environments. These include Unix/Linux systems, embedded devices, network appliances, and operational technology (OT)–adjacent infrastructure, where…

Muhammad Al-Khatib, on medium.com

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

Likely the telnetd daemon expands the attacker-controlled USER environment variable into the login command line without enforcing argument boundaries, so the value is interpreted as additional command-line options.

Impact

An unauthenticated remote attacker could gain immediate root-level access, leading to full system compromise; the text notes active exploitation in the wild and inclusion in CISA's KEV catalog.

What the attacker needed

Telnet service exposed on the network; GNU Inetutils telnetd version 1.9.3 to 2.7

The fix

The vulnerability was fixed by upgrading to GNU Inetutils 2.7-2 or later, which introduces stricter sanitisation of variables used during expansion.

How it was found

  1. Scan the target to find exposed services and identify Telnet on TCP port 23.
  2. Optionally run an Nmap version detection scan to try to confirm the telnetd version.
  3. Attempt exploitation directly because the exploit is simple.
  4. Establish an unauthenticated Telnet connection and gain immediate root-level access.

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 into a computer over the network. The telnetd program on the server asks the login program to check your password. This report shows that telnetd passed a user-supplied value (the USER variable) directly into the login command without checking it, so an attacker could add a special option that tells login to skip the password check entirely. The result is that anyone who can reach the Telnet port can become the root (administrator) user without knowing any password.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.