{"id":10955,"date":"2026-02-26T10:03:47","date_gmt":"2026-02-26T10:03:47","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2026\/02\/26\/27-years-old-telnet-vulnerability-enables-attackers-to-gain-root-access\/"},"modified":"2026-02-26T10:03:47","modified_gmt":"2026-02-26T10:03:47","slug":"27-years-old-telnet-vulnerability-enables-attackers-to-gain-root-access","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2026\/02\/26\/27-years-old-telnet-vulnerability-enables-attackers-to-gain-root-access\/","title":{"rendered":"27 Years old Telnet Vulnerability Enables Attackers to Gain Root Access"},"content":{"rendered":"<p>    27 Years old Telnet Vulnerability Enables Attackers to Gain Root Access<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p>A newly confirmed vulnerability in the <a href=\"https:\/\/cybersecuritynews.com\/telnetd-vulnerability-exploited\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">telnet daemon (telnetd) in GNU Inetutils<\/a> has revived a 27-year-old security flaw, allowing attackers to gain root access by exploiting improper sanitization of environment variables, with no authentication required.<\/p>\n<p>Tracked as\u00a0CVE-2026-24061, the flaw exists in GNU Inetutils through version 2.7 and enables remote authentication bypass when a malicious client supplies\u00a0<code>\"-f root\"<\/code>\u00a0as the value for the\u00a0<code>USER<\/code>\u00a0environment variable.<\/p>\n<p>This discovery, reported by security researcher Ron Ben Yizhak, prompted a deeper investigation into whether the ghost of\u00a0CVE-1999-0073,\u00a0a 1999 vulnerability allowing attackers to inject environment variables like\u00a0<code>LD_LIBRARY_PATH<\/code>\u00a0to subvert system libraries \u2014 still haunted modern telnet implementations.<\/p>\n<p>The core problem lies in how telnetd launches\u00a0<code>\/bin\/login<\/code>. Because both processes run in a root-to-root context, the Linux kernel sets\u00a0<code>AT_SECURE<\/code>\u00a0to\u00a00\u00a0in the process\u2019s auxiliary vector.<\/p>\n<p>This value is critical when positive,\u00a0<code>AT_SECURE<\/code>\u00a0signals the dynamic linker (<code>ld-linux.so<\/code>) and glibc to enter\u00a0secure-execution mode, which automatically discards or neutralizes dangerous environment variables like\u00a0<code>LD_LIBRARY_PATH<\/code>,\u00a0<code>GCONV_PATH<\/code>, and others.<\/p>\n<p>With\u00a0<code>AT_SECURE<\/code>\u00a0at zero, the dynamic linker treats the session as fully trusted, meaning\u00a0every environment variable passed by a telnet client is accepted without restriction. This shifts the burden of sanitization entirely onto telnetd itself a responsibility it fails to meet.<\/p>\n<p>Although a recent commit (<code>4db2f19f<\/code>) introduced\u00a0<code>unsetenv(\"CREDENTIALS_DIRECTORY\")<\/code>\u00a0to address part of the problem, the fix remains dangerously incomplete. Telnetd currently attempts to block harmful variables using a blacklist approach, filtering by prefix or full variable name. Researchers have confirmed this is insufficient.<\/p>\n<p>An attacker can inject GNU gettext-specific variables such as\u00a0<code>OUTPUT_CHARSET<\/code>\u00a0and\u00a0<code>LANGUAGE<\/code>, alongside the glibc variable\u00a0<code>GCONV_PATH<\/code>, directly through the telnet protocol. By declaring a character set mismatch (e.g., injecting\u00a0<code>ISO-8859-1<\/code>\u00a0against a UTF-8 system), an attacker tricks gettext into calling\u00a0<code>iconv_open()<\/code>.<\/p>\n<p>Since\u00a0<code>AT_SECURE<\/code>\u00a0is 0,\u00a0<code>iconv_open()<\/code>\u00a0blindly follows the attacker-supplied\u00a0<code>GCONV_PATH<\/code>\u00a0to locate a custom\u00a0<code>gconv-modules<\/code>\u00a0file \u2014 and from there,\u00a0loads arbitrary shared objects as root.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-27-years-old-telnet-vulnerability-poc\"><strong>27 Years old Telnet Vulnerability PoC<\/strong><\/h2>\n<p><a href=\"https:\/\/seclists.org\/oss-sec\/2026\/q1\/199\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">In a demonstrated proof of concept by Justin Swartz<\/a>, a low-privileged local user (<code>abuser<\/code>) injected environment variables through a standard telnet session to load a malicious shared library (<code>libcash2trash.so<\/code>).<\/p>\n<p>When\u00a0<code>\/bin\/login<\/code>\u00a0attempted to display a localized prompt, gettext triggered the exploit chain. The payload executed silently before the connection dropped \u2014 copying\u00a0<code>\/bin\/sh<\/code>\u00a0with SUID\/SGID permissions.<\/p>\n<p>The resulting binary ran with\u00a0<code>euid=0 (root)<\/code>\u00a0and\u00a0<code>egid=0 (root)<\/code>, granting full root privileges to the unprivileged user.\u00a0No telnetd authentication was performed or required.<\/p>\n<p>Researchers suggest consolidating a single CVE for \u201cImproper environment sanitization in telnetd\u201d to cover both the\u00a0<code>CREDENTIALS_DIRECTORY<\/code>\u00a0vector and this dynamic linker escape comprehensively.<\/p>\n<p>The recommended remediation moves away from the flawed blacklist model entirely. Following the\u00a0OpenSSH\u00a0AcceptEnv-style approach, building a strict whitelist of safe environment variable names for\u00a0\/bin\/login, paired with rigorous input sanitization on their values, is considered the only reliable long-term fix.<\/p>\n<p>Organizations still running telnet services are urged to disable telnetd immediately and migrate to SSH. Where telnet cannot be avoided, upgrading GNU Inetutils and applying strict network-level access controls is essential until a comprehensive patch is released.<\/p>\n<p class=\"has-text-align-center has-background\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 94%,rgb(169,184,195) 100%)\"><strong>Follow us on <a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google News<\/a>, <a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">LinkedIn<\/a>, and <a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">X<\/a> for daily cybersecurity updates. <a href=\"https:\/\/cybersecuritynews.com\/contact-us\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Contact us<\/a> to feature your stories.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/27-years-old-telnet-vulnerability\/\">27 Years old Telnet Vulnerability Enables Attackers to Gain Root Access<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Abinaya<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/27-years-old-telnet-vulnerability\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>27 Years old Telnet Vulnerability Enables Attackers to Gain Root Access A newly confirmed vulnerability in the telnet daemon (telnetd) in GNU Inetutils has revived a 27-year-old security flaw, allowing attackers to gain root access by exploiting improper sanitization of environment variables, with no authentication required. Tracked as\u00a0CVE-2026-24061, the flaw exists in GNU Inetutils through [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,648],"tags":[130],"class_list":["post-10955","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-vulnerability-news","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/10955"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=10955"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/10955\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=10955"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=10955"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=10955"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}