Description
The telnetd service from GNU InetUtils is vulnerable to authentication-bypass, tracked as CVE-2026-24061, in versions up to version 2.7. During Telnet authentication the SB byte can be sent to indicate sub-negotiation which allows for the exchange of sub-option parameters after both parties have agreed to enable a specific functional option. Environment variables can be sent as sub-options and it's the USER environment variable which introduces the authentication bypass in this scenario. When the USER environment variable gets sent to the GNU inetutils telnetd service during authentication, the variable gets appended without proper sanitization to an execv call to the /usr/bin/login binary. The login binary has a -f flag which skips authentication for a specific user. So the exploit sets the `USER` environment variable to -f root and the telnetd service responds with a root shell.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/linux/telnet/gnu_inetutils_auth_bypassmsf undefined(gnu_inetutils_auth_bypass) > show actions ...actions...msf undefined(gnu_inetutils_auth_bypass) > set ACTION < action-name >msf undefined(gnu_inetutils_auth_bypass) > show options ...show and set options...msf undefined(gnu_inetutils_auth_bypass) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub