---
id: "CVE-2026-115778"
kind: "vulnerability"
aliases: ["CVE-2026-115778", "GHSA-cwm5-jh59-mwxr"]
title: "Twisted: Unauthenticated Remote Denial of Service in the Twisted conch Telnet Transport via an Unbounded Subnegotiation Buffer"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "Twisted", "fixed": ["26.10.0rc1"], "affected": "<= 26.4.0", "ecosystem": "pypi"}]
ecosystems: ["pypi"]
tags: ["cwe-400", "cwe-770", "package", "python", "self-hosted", "twisted"]
not_affected_if: ["no-telnet-or-manhole-service", "twisted-26.10.0rc1-or-later"]
published_at: "2026-10-23T20:45:26+00:00"
first_seen_at: "2026-10-23T20:59:05+00:00"
updated_at: "2026-10-23T21:00:15+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-cwm5-jh59-mwxr", "first_seen_at": "2026-10-23T20:59:05+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-115778", "first_seen_at": "2026-10-23T21:57:34+00:00"}]
---

# Twisted: Unauthenticated Remote Denial of Service in the Twisted conch Telnet Transport via an Unbounded Subnegotiation Buffer

Twisted's conch telnet transport keeps every byte of an unterminated telnet subnegotiation in memory with no size cap. A remote unauthenticated peer can exhaust server memory over one connection and crash the process.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:Twisted affected <= 26.4.0 fixed 26.10.0rc1

## How to check

Run pip show Twisted and check whether the version is 26.4.0 or lower.
Check whether any service uses twisted.conch.telnet or the manhole telnet service, for example grep -r 'conch' in your code.

## Fix

Upgrade Twisted to 26.10.0rc1 or later.
If you cannot upgrade, do not expose the telnet or manhole service to untrusted networks.

## Timeline

- 2026-10-23T20:59:05+00:00 ghsa https://github.com/advisories/GHSA-cwm5-jh59-mwxr
- 2026-10-23T21:57:34+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-115778

## From the sources

## 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:

```python
# 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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
