GNU InetUtils telnetd LINEMODE SLC Pre-Auth Buffer Overflow (CVE-2026-32746)
by DREAM Security Research Team (Adiel Sol, Arad Inbar, Erez Cohen, Nir Somech, Ben Grinberg, Daniel Lubel); PoC by jeffaf · 2026-07-05
- Severity
- Critical
- CVE
- CVE-2026-32746
- Category
- network
- Affected product
- GNU InetUtils telnetd
- Affected versions
- Through 2.7 (all versions); any telnetd derived from the BSD SLC codebase
- Disclosed
- 2026-07-05
- Patch status
- unpatched
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-03 |
| Author / Researcher | DREAM Security Research Team (Adiel Sol, Arad Inbar, Erez Cohen, Nir Somech, Ben Grinberg, Daniel Lubel); PoC by jeffaf |
| CVE / Advisory | CVE-2026-32746 |
| Category | network |
| Severity | Critical |
| CVSS Score | 9.8 (CVSS 3.1) |
| Status | PoC (overflow trigger + verification only; no code execution/shellcode included) |
| Tags | telnetd, inetutils, linemode, slc, buffer-overflow, pre-auth, cwe-120, cwe-787 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | GNU InetUtils telnetd |
| Versions Affected | Through 2.7 (all versions); any telnetd derived from the BSD SLC codebase |
| Language / Platform | Python 3 PoC targeting a C telnetd daemon on Linux |
| Authentication Required | No (triggered before login prompt/authentication) |
| Network Access Required | Yes |
Summary
GNU InetUtils telnetd’s add_slc() function in telnetd/slc.c appends 3 bytes per SLC (Set Local Characters) triplet into a fixed 108-byte buffer (slcbuf) with no bounds checking. During telnet option negotiation, before any login prompt is shown, an unauthenticated client can request LINEMODE and then send a crafted SLC suboption containing 40-60 triplets with out-of-range function codes, causing the buffer to overflow and corrupting the slcptr pointer plus adjacent BSS data. This PoC completes the negotiation, sends the oversized SLC suboption, and confirms the overflow by observing an anomalously large SLC response that leaks BSS memory back to the client — it does not attempt to weaponize the overflow into code execution.
Vulnerability Details
Root Cause
add_slc() writes 3 bytes per received SLC triplet into a fixed 108-byte slcbuf without validating the total triplet count or buffer bounds, allowing an attacker-controlled overflow of the buffer and the slcptr pointer that tracks it.
Attack Vector
- Connect to telnetd and complete initial telnet option negotiation.
- Client proactively sends
WILL LINEMODEto initiate LINEMODE negotiation. - Server responds
DO LINEMODEand begins SLC suboption processing. - Client sends a crafted SLC suboption with 40-60 triplets using function codes greater than 18 (NSLC), each triggering a 3-byte “not supported” reply queued into
slcbuf. - After roughly 35 triplets the buffer overflows, corrupting
slcptrand adjacent BSS memory. end_slc()sends data fromslcbufup through the corruptedslcptrposition back to the client, leaking BSS memory and confirming the overflow via the oversized response.
Impact
Pre-authentication memory corruption in telnetd; per the WatchTowr writeup referenced in the source repo, the same primitive can reportedly be extended toward remote code execution on 32-bit systems via a def_slcbuf/free() primitive, though this PoC only demonstrates the crash/leak, not RCE.
Environment / Lab Setup
Target: Debian container running inetutils-telnetd 2.4 under xinetd, exposed on port 2323 (via included Docker Compose lab)
Attacker: Python 3, Docker + Docker Compose
Proof of Concept
PoC Script
See
exploit.py,detect.py,Dockerfile,docker-compose.yml,xinetd-telnet.confin this folder.
| |
detect.py performs non-destructive version detection; exploit.py connects to the target, negotiates LINEMODE, sends the oversized SLC suboption, and verifies the overflow by inspecting the resulting oversized/leaked SLC response.
Detection & Indicators of Compromise
Signs of compromise:
- telnetd crash or restart correlated with SLC suboption negotiation in session logs/pcap
- Anomalously large SLC suboption responses containing non-ASCII/binary leaked memory
- Telnet sessions with LINEMODE negotiation containing 40+ SLC triplets from a single client before authentication
Remediation
| Action | Detail |
|---|---|
| Primary fix | Vendor patch expected by April 1, 2026 per source repo — confirm current InetUtils release notes for the fix commit |
| Interim mitigation | Disable or firewall the telnet service; if telnet must remain available, restrict access via network ACLs and monitor/limit SLC triplet counts during LINEMODE negotiation |
References
Notes
Mirrored from https://github.com/jeffaf/cve-2026-32746 on 2026-07-05.
| |