CVE-2026-115776: Twisted: Unauthenticated Remote Denial of Service in the Twisted IRC Server via an Unbounded Line Buffer
Twisted's IRC protocol class, twisted.words.protocols.irc.IRC, buffers input with no length limit. One unauthenticated connection that streams bytes without a line feed can exhaust the memory of a twistd words IRC server and drop every user. Twisted 26.4.0 and earlier are affected. Upgrade to 26.10.0rc1.
Published Oct 23, 2026 · Analysis Nov 2, 2026
What an attacker can do
IRC.dataReceived decodes each chunk, joins it to self.buffer and splits on a line feed. The last fragment goes back into self.buffer. If the client never sends a line feed, the whole stream stays in the buffer. IRC is a plain Protocol, not a LineReceiver, so it has no MAX_LENGTH, no lineLengthExceeded hook and no timeout. The twistd words server class IRCUser inherits the method unchanged, and the buffering happens before PASS, NICK or USER, so no login is needed.
The advisory measured one connection sending 60 MB of line-feed-free data. Server resident memory rose from about 47 MB to 2966 MB. The same volume sent as normal commands left memory flat. The repeated join-and-split copy also adds quadratic cost, so the effect arrives faster.
One process serves all users, so the out-of-memory kill drops everyone and the service stays down until restart. There is no data exposure and no code execution. Anyone who can open a TCP connection to your IRC port can do this.
Who is affected
Twisted 26.4.0 and earlier, per the pip package range. The risk applies to services that use twisted.words.protocols.irc.IRC or twisted.words.service.IRCUser, which includes the server started by twistd words. Applications that use Twisted only for other protocols do not run this code path.
Check the installed version:
pip show TwistedTwisted
- 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 listed for this advisory. It is a release candidate, so test it before rollout.
pip install --upgrade "Twisted==26.10.0rc1"Pull request 12771 adds a MAX_LENGTH class constant of 16384 to IRC and a lineLengthExceeded hook, modelled on LineReceiver. Data over the limit, with or without a line feed, drops the connection. If you cannot upgrade, firewall the IRC port to trusted clients and set a memory limit on the process so the failure stays contained.
How to tell if you were hit
Watch the twistd words process for fast resident-memory growth tied to a single client address. A connection that stays open, never registers a nick and sends a steady stream is the pattern. Look for out-of-memory kills of the process in the system log (for example OOM-killer lines in dmesg or journalctl) and for the service restarting with all users disconnected at once. Packet captures will show a long TCP stream with no 0x0A byte.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
An unbounded-buffer vulnerability (CWE-770) in the Twisted words IRC server lets any unauthenticated remote client exhaust server memory. twisted.words.protocols.irc.IRC.dataReceived appends every received byte to a per-connection buffer and only removes data at a line feed, with no maximum length. Because IRC is a plain Protocol and not a LineReceiver, one connection that streams bytes without a line feed grows the buffer without bound and drives the whole single-threaded process to out-of-memory, dropping every user at once. The twistd words server inherits the method unchanged through IRCUser, and the data is buffered before any authentication.
Details
IRC.dataReceived keeps everything up to the last line feed in self.buffer:
# twisted/words/protocols/irc.py
class IRC(protocol.Protocol): # not a LineReceiver, so no MAX_LENGTH
buffer = ""
def dataReceived(self, data):
if isinstance(data, bytes):
data = data.decode("utf-8")
lines = (self.buffer + data).split(LF)
self.buffer = lines.pop() # no 3line feed -> whole input stays buffered
...With no line feed in the data, lines.pop() returns the entire accumulated content to self.buffer, so it grows by every chunk and is never bounded; IRC defines no MAX_LENGTH, no lineLengthExceeded, and no timeout, so the connection is never closed. The twistd words server protocol IRCUser subclasses IRC without overriding dataReceived, and the buffer is filled before any PASS, NICK, or USER, so no credentials are required.
Affected product: Twisted (twisted.words), twisted.words.protocols.irc.IRC and its subclass twisted.words.service.IRCUser Affected versions: 26.4.0 and earlier
PoC
On a standard Twisted words IRC server (the server twistd words runs, using IRCUser), an unauthenticated client opens a single TCP connection and continuously sends data that contains no line feed, never completing a line. Every chunk is appended to the connection's line buffer, and because no complete line is ever formed none of it is consumed, so the buffer grows by the full volume sent.
In a measured run against a real IRCFactory server, one unauthenticated connection sending 60 MB of line-feed-free data raised the server process resident memory from about 47 MB to 2966 MB (roughly 49 MB per MB sent) with the connection still open and no limit triggered. Sending the same volume as normal line-feed-terminated commands leaves memory flat, which isolates the cause to the missing line-length bound.
Impact
An unauthenticated remote denial of service from allocation without limits (CWE-770) leading to uncontrolled resource consumption (CWE-400). A single credential-free connection exhausts the memory of the whole twistd words process, and because one process serves every user, the crash drops all connections at once and the service stays down until it is restarted. The quadratic buffer copy reaches the same effect faster. There is no confidentiality or integrity impact and no code execution.
Credited to arkmarta.
Questions
- Does CVE-2026-115776 need authentication?
No. The buffer fills before any PASS, NICK or USER command, so an anonymous client can trigger it.
- Can it lead to code execution?
No. The advisory states there is no confidentiality or integrity impact and no code execution. The result is memory exhaustion and a denial of service.
- Is my Twisted app affected if it does not run an IRC server?
Only code that uses the IRC protocol class or IRCUser in twisted.words is affected. Other Twisted protocols are not part of this advisory.
References
Read for this analysis:
- https://github.com/twisted/twisted/security/advisories/GHSA-53xc-49m8-p798
- https://github.com/twisted/twisted/commit/01f8cff7753c1edac132380b2ea939fa6bdbab30
- https://github.com/twisted/twisted/commit/ac90fb7b0ab73688a581fcd9a7c0577ec8ca3059
- https://github.com/twisted/twisted/releases/tag/twisted-26.10.0rc1
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 entriesGHSA-vpp8-g58w-m8mp
Twisted: Unauthenticated Remote Denial of Service in the Twisted HTTP/2 Server via Rapid Stream Reset
high7.5Oct 29, 2026CVE-2026-83813
Twisted: DNS Response Spoofing in twisted.names Due to Missing Source Address Validation
low3.1Oct 27, 2026CVE-2026-115774
Twisted: Denial of Service in the Twisted IMAP4 Server via a Negative Literal Size in SEARCH
medium4.9Oct 23, 2026CVE-2026-115775
Twisted: Unauthenticated Remote Denial of Service in the Twisted words domish XML Element Stream via an Unbounded Element Tree
high8.7Oct 23, 2026CVE-2026-115778
Twisted: Unauthenticated Remote Denial of Service in the Twisted conch Telnet Transport via an Unbounded Subnegotiation Buffer
high7.5Oct 23, 2026CVE-2026-115877
Twisted: HTTP Request Smuggling in twisted.web via a Bare CR or LF in a Header Value
medium5.4Oct 23, 2026
