GHSA-cwm5-jh59-mwxr: High severity pip/twisted vulnerability

Published Oct 23, 2026
·
Updated

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.MAXLENGTH, 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.

Affected Software

1 affected componentFixes available
pip/twisted<=26.4.0
26.10.0rc1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/Twisted to a version that resolves this vulnerability.

    Fixed in 26.10.0rc1

Event History

Oct 23, 2026
Advisory Published
via GitHub·08:45 PM
Data Sourced
via GitHub·08:45 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can exploit this issue?

Any unauthenticated remote peer that can connect to a server using the Twisted Conch telnet transport can trigger it. Exploitation occurs before authentication because telnet option negotiation is handled at the transport layer.

2

What does an attacker need to send?

The attacker opens a telnet subnegotiation with IAC SB and continuously sends bytes without sending the IAC SE terminator. A single connection is sufficient because the unterminated subnegotiation buffer persists across reads.

3

What is the operational impact?

The per-connection command buffer grows without a maximum length until the process is killed, allowing remote memory exhaustion and denial of service. The affected buffer is released only when the withheld IAC SE terminator is received.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203