NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2026-115778: Twisted: Unauthenticated Remote Denial of Service in the Twisted conch Telnet Transport via an Unbounded Subnegotiation Buffer

highCVSS 3.1 7.5GHSA-cwm5-jh59-mwxr

The Twisted conch telnet transport, twisted.conch.telnet, stores telnet subnegotiation bytes with no size limit. A peer that sends IAC SB and never sends IAC SE can grow a buffer until the server process is killed. No login is needed. Twisted 26.4.0 was confirmed affected. Upgrade to 26.10.0rc1.

Published Oct 23, 2026 · Analysis Nov 2, 2026

What an attacker can do

Telnet.dataReceived enters the subnegotiation state on IAC SB (0xFF 0xFA). In that state every non-IAC byte is appended to self.commands, a list with no length check. The list lives across reads and is deleted only when IAC SE (0xFF 0xF0) arrives. The attacker simply withholds that terminator.

Negotiation runs at the transport layer before authentication, and the bytes are consumed before any application callback. An application built on the transport cannot add its own bound. Each byte is stored as a separate list element, so memory use is several times the traffic sent. A slow peer, or a few connections, can bring the process down.

When the operating system kills the process, every service it hosts goes with it. The advisory names the Twisted manhole telnet service as an example endpoint. There is no data exposure or code execution. The exposure is any Twisted telnet or manhole transport reachable by untrusted peers.

Who is affected

The advisory confirmed 26.4.0, and the package range is Twisted 26.4.0 and earlier. Only deployments that expose a telnet transport built on twisted.conch.telnet are exposed, such as manhole telnet services or custom Telnet subclasses. SSH-only conch servers do not use this parser.

pip show Twisted

Twisted

Ecosystem
PyPI
Affected
<= 26.4.0
Fixed in
26.10.0rc1
Check
pip show Twisted

How to fix it

Upgrade to Twisted 26.10.0rc1, the patched version in the advisory. It is a release candidate, so test before you roll it out.

pip install --upgrade "Twisted==26.10.0rc1"

Pull request 12750 caps the subnegotiation buffer at 4096 bytes. Extra bytes are dropped and the connection stays open, matching BSD telnetd. Until you upgrade, keep telnet and manhole endpoints on localhost or a trusted network, and cap process memory.

How to tell if you were hit

Look for a telnet connection that stays open and sends a steady stream after the bytes 0xFF 0xFA with no 0xFF 0xF0 following. In packet captures, filter on the telnet port and look for an IAC SB with no matching IAC SE. On the host, watch for steady memory growth in the telnet-serving process, and OOM-killer entries in the system log followed by an unplanned restart.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

An allocation-without-limits vulnerability (CWE-770) in the Twisted conch telnet transport lets any unauthenticated remote peer exhaust server memory over a single connection. When the peer opens a telnet subnegotiation with IAC SB and then streams bytes without ever sending the IAC SE terminator, every byte is appended to a per-connection buffer that has no maximum length. The buffer persists across reads and is released only on the terminator the attacker withholds, so it grows without bound until the process is killed.

Details

The option-negotiation state machine in Telnet.dataReceived enters the subnegotiation state on IAC SB and sets an empty command list. In that state every non-IAC byte is appended to the list with no length check:

# src/twisted/conch/telnet.py  (Telnet.dataReceived)
elif self.state == "subnegotiation":
    if b == IAC:
        self.state = "subnegotiation-escaped"
    else:
        self.commands.append(b)      # unbounded: no len(self.commands) check

self.commands is an instance attribute that persists across dataReceived calls and is deleted only when IAC SE completes the subnegotiation. Negotiation runs at the transport layer before authentication, and the bytes are consumed inside dataReceived before any application callback, so an application cannot impose a bound. Twisted caps other parser buffers, for example NetstringReceiver.MAX_LENGTH, but not this one.

Affected product: Twisted, twisted.conch.telnet transport Affected versions: confirmed against 26.4.0

PoC

On any endpoint that exposes the Twisted telnet transport, such as the Twisted manhole telnet service, open one connection and send the two bytes IAC SB (0xFF 0xFA), then stream any non-0xFF bytes continuously and never send the IAC SE terminator (0xFF 0xF0). No credentials are required, because option negotiation runs before authentication.

Every byte is appended to the per-connection subnegotiation buffer with no maximum, and the buffer is released only by the terminator the attacker withholds, so it grows for the life of the connection. Because each byte is retained as a separate element the memory consumed is several times the traffic sent, so a modest-bandwidth peer, or several such connections, drives the process to memory exhaustion.

Impact

This is an unauthenticated remote denial of service (CWE-770, CWE-400) by memory exhaustion. A single connection grows an in-memory buffer without bound at a cost proportional to the bytes sent, amplified by per-byte object overhead, until the operating system kills the server and every service it hosts. There is no confidentiality or integrity impact and no code execution. The affected surface is any deployment that exposes a Twisted telnet or manhole transport to untrusted peers.

Credited to arkmarta.

Questions

Does CVE-2026-115778 affect SSH servers built with Twisted conch?

The advisory concerns the telnet transport in twisted.conch.telnet. An SSH-only service does not parse telnet subnegotiation, so this bug does not apply to it.

Does an attacker need credentials?

No. Option negotiation happens before authentication, so any peer that can open a connection can send IAC SB and keep streaming.

Is there a fixed release?

Yes: 26.10.0rc1. The fix limits the subnegotiation buffer to 4096 bytes and discards the excess.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More PyPI vulnerabilities

All PyPI entries