27 Years old Telnet Vulnerability Enables Attackers to Gain Root Access
## Newly Discovered Telnet Vulnerability Allows Root Access
Newly Discovered Telnet Vulnerability Allows Root Access
A vulnerability in the telnet daemon (telnetd) in GNU Inetutils has been identified, affecting versions through 2.7. This flaw, tracked as CVE-2026-24061, permits attackers to bypass authentication by exploiting improper sanitization of environment variables via the USER variable.
The issue arises when telnetd launches /bin/login , as both processes operate in a root-to-root context. This configuration results in the Linux kernel setting AT_SECURE to 0, indicating that the session is fully trusted. Consequently, all environment variables provided by the telnet client are accepted without restriction, placing the responsibility of sanitization on telnetd, which is currently insufficient.
Although a recent update ( 4db2f19f ) attempted to mitigate the issue by introducing unsetenv("CREDENTIALS_DIRECTORY") , it does not completely address the vulnerability. The current approach of blacklisting harmful variables is inadequate. Attackers can exploit variables specific to GNU gettext, such as OUTPUT_CHARSET and LANGUAGE , and glibc variable GCONV_PATH to load arbitrary shared objects.
A vulnerability in the telnet daemon (telnetd) in GNU Inetutils has been identified, affecting versions through 2.7.
A proof of concept demonstrated by Justin Swartz showed that a low-privileged user could inject environment variables during a telnet session to load a malicious library. This library grants root privileges by copying /bin/sh with SUID/SGID permissions, circumventing authentication.
Organizations should disable telnetd services and transition to SSH. If telnet usage is unavoidable, updating GNU Inetutils and implementing strict network access controls is critical until a comprehensive patch is available. Adopting a whitelist approach for safe environment variables, similar to OpenSSH's AcceptEnv, is advised for long-term mitigation.
For ongoing updates, follow us on Google News , LinkedIn , and X .
Based on reporting by Cyber Security News.
