Skip to content
Exploit for CVE-2026-141380

Exploit for CVE-2026-141380

Sploitus • December 3, 2026

- **CVE-2026-141380** — netkit `telnetd` / `telnetd-ssl` (parche Debian `ACCEPT_USERVAR`). Pre-auth, puede llevar a root. CVSS 9.8. Sin parche al momento de escribir esto.

- **CVE-2026-28372** — GNU inetutils `telnetd` (abuso de credenciales de systemd en `login`).

Es una herramienta de **detección y evaluación de riesgo**, pensada para

inventariar hosts y priorizar mitigación. Reporta qué precondiciones de riesgo

están presentes en cada host, como un checklist, y emite un veredicto según una

> **No es un exploit.** No inyecta variables de entorno, no crea `login.noauth`,

> no usa `LD_PRELOAD`, no intenta autenticarse ni escalar privilegios. Solo

> observa precondiciones (paquete, servicio, usuario, versión de `login`, y la

> negociación de opciones Telnet). Los detalles de explotación se omiten a

> propósito; para entender el mecanismo, ver las referencias oficiales al final.

El repo trae dos detectores, ambos en Python 3 y sin dependencias:

| `telnet_envinj_detector.py` | Ampliado: CVE-2026-141380 **y** CVE-2026-28372 | Checklist con ✓/✗ por precondición + veredicto según matriz |

| `scan_cve_2026_141380.py` | Enfocado solo en CVE-2026-141380 | Veredicto por host, más conciso |

Ambos comparten los mismos modos (`--local` y `--target`) y la misma idea:

detección, no explotación. Para inventario y priorización, usa

`telnet_envinj_detector.py`; para un chequeo rápido y directo de CVE-2026-141380,

- Python 3.7+ (solo librería estándar; sin dependencias).

- Para el modo local: utilidades del sistema (`dpkg-query`/`rpm`, `login`, `ss`).

No necesita Docker ni ninguna red de laboratorio. Se usa sobre un host real,

### Modo local (definitivo) — se corre en el host a evaluar

sudo python3 telnet_envinj_detector.py --local

Recolecta todo: paquete y familia del daemon, si el servicio está activo, con

qué usuario corre `telnetd`, la versión de `login`/util-linux y la negociación

### Modo remoto — se apunta a una IP/host directo

python3 telnet_envinj_detector.py --target 192.168.1.10

python3 telnet_envinj_detector.py --target 192.168.1.0/24 --port 23

python3 telnet_envinj_detector.py --target host1,host2,10.0.0.0/24 --json

Por red solo es visible la negociación de opciones; el modo remoto da una

heurística ("posiblemente afectado") y recomienda confirmar con `--local`.

--local Evaluar el host local.

--target SPEC IP/host/CIDR (separados por coma).

--port N Puerto Telnet (def. 23).

--timeout S Timeout por host (def. 4s).

--workers N Concurrencia en modo remoto (def. 50).

--ascii Marcas ASCII [+]/[-]/[?] en vez de ✓/✗.

=== Detector telnetd env-injection (CVE-2026-141380 / CVE-2026-28372) ===

[✓] Daemon telnet instalado: telnetd-ssl 0.17.41+really0.17-6 -> netkit (afectado por CVE-2026-141380)

[✓] Servicio telnet activo (inetd.conf: 23 stream tcp nowait root ...)

[✓] telnetd se ejecuta como root (usuario: root)

[✓] login = util-linux 2.41.5 (>= 2.40: soporta CREDENTIALS_DIRECTORY)

[✓] Negocia NEW-ENVIRON antes de autenticar

VEREDICTO: CRITICO - CVE-2026-141380 (vector enlazador, root-a-root)

| Daemon telnet (activo) | `login` / util-linux | Usuario que ejecuta `telnetd` | Resultado |

| No instalado / inactivo | cualquiera | N/A | **No vulnerable** |

| Netkit (`telnetd` / `telnetd-ssl`) | 2.40 o superior | sin privilegios | **Crítico** — CVE-2026-141380 (vector `login.noauth`) |

| Netkit (`telnetd` / `telnetd-ssl`) | cualquiera | `root` | **Crítico** — CVE-2026-141380 (vector del enlazador, `AT_SECURE=0`) |

| GNU `inetutils-telnetd` sin parchear | 2.40 o superior | sin privilegios | **Alto** — CVE-2026-28372 (vector `login.noauth`) |

| Netkit o inetutils | menor que 2.40 | sin privilegios | Sin bypass `login.noauth` — el servicio **sigue siendo inseguro** y debe retirarse |

Notas sobre la lógica de la matriz (según los avisos oficiales):

- El vector `login.noauth` depende del soporte de credenciales de servicio de

systemd añadido a `login(1)` de **util-linux 2.40**; con util-linux < 2.40 ese

vector no aplica. Distribuciones con `login` provisto por `shadow` (no

- Cuando `telnetd` ejecuta `/bin/login` en contexto **root-a-root**, `AT_SECURE`

queda en 0 y el enlazador dinámico no descarta variables tipo `LD_*`, lo que

habilita el vector del enlazador aunque no exista `login.noauth`.

- El modo remoto no ve ni el paquete ni la versión de util-linux ni el usuario:

por eso el veredicto definitivo es el modo `--local` sobre el host.

Mientras no haya parche para CVE-2026-141380:

1. Deshabilitar `telnetd` y cerrar el puerto 23.

2. Purgar el paquete del servidor telnet (`telnetd-ssl` / netkit / inetutils) y migrar a **SSH**.

3. Si debe seguir activo temporalmente: restringir el 23 por firewall a redes de gestión y segmentar.

4. Tras el parche: re-ejecutar el detector para confirmar la remediación.

En [`lab/`](lab/) hay un target vulnerable en Docker (netkit `telnetd-ssl`),

publicado solo en `127.0.0.1`, para probar el detector de forma segura. Ver

- CVE-2026-141380 — Debian security tracker:

- CVE-2026-28372 — NVD:

- CVE-2026-28372 — Ubuntu (notas sobre util-linux 2.40):

- Hilo oss-security (SafeBreach / Justin Swartz):

Herramienta para evaluar y asegurar sistemas **propios o con autorización

explícita**. El uso contra sistemas de terceros sin permiso puede ser ilegal.

The full story

This article is one source in a clustered incident — the cluster page carries the summary, timeline and every other outlet covering it.

Netkit Telnetd Flaw CVE-2026-141380 Enables Root Code Execution on Debian-Based Systems Researcher Liad Levy disclosed CVE-2026-141380 on the OSS-Security list on 2 December 2026, describing a pre-authentication flaw in the netkit telnetd implementation shipped in Debian's patch series. The Debian patch 124-support_uservar.diff causes client-marked USERVAR environment variables to bypass the envvarok() whitelist and be passed to setenv(), and the setuid telnetlogin wrapper forwards them to /bin/login. One article rates the path to root code execution CVSS 3.1 9.8, while another notes the score applies to the root-execution path. Affected packages reportedly include Debian telnetd and telnetd-ssl (source package telnet 0.17-42 and earlier), along with Gentoo net-misc/netkit-telnetd; Levy reported full exploitation on Debian 13 trixie, Ubuntu 25.04 and 25.10, and Kali rolling. When the daemon runs as root, attacker-supplied LD_PRELOAD libraries may execute as root during login. Under Debian's non-root inetd entry, a login.noauth file in CREDENTIALS_DIRECTORY can cause util-linux 2.40+ to skip PAM, per one article. Exploitation requires the attacker to reach port 23 and write a file on the target, which can come from a separate file-write flaw. The disclosure reports successful lab tests; the articles do not report attacks in the wild. Suggested fixes include reverting the is_uservar relaxation, dropping ACCEPT_USERVAR, or whitelisting variables in telnetlogin, but no released patch is reported. A related GNU inetutils issue, CVE-2026-28372, is referenced as background. 4 sources 72

Extracted Entities