CVE-2026-115775: Twisted: Unauthenticated Remote Denial of Service in the Twisted words domish XML Element Stream via an Unbounded Element Tree
Twisted up to and including 26.4.0 has no limit on element depth or child count in the `twisted.words.xish.domish` XML element stream. An unauthenticated peer can exhaust server memory with one stream. This hits XMPP servers and components built on Twisted Words. The patched version listed is 26.10.0rc1.
Published Oct 23, 2026 · Analysis Nov 2, 2026
What an attacker can do
In ExpatElementStream._onStartElement, each start tag appends a new element to the current element's children list and descends into it. Nothing checks depth or child count. The parser emits and frees an element only when its end tag arrives while it sits directly under the document root. If a peer opens a container element and keeps sending children without ever closing it, every child stays in memory.
XmlStream.dataReceived passes bytes to self.stream.parse(data) with no size limit. In XMPP this parsing runs during stream negotiation, before authentication, so the attacker needs no credentials. Each small element becomes a full Python object, so memory use is many times the bytes sent. One stream, or a few, from a low-bandwidth peer can push the process to memory exhaustion until the operating system kills it.
The advisory reports no confidentiality or integrity impact and no code execution. The exposed surface is any deployment that parses untrusted XML streams with this stack, such as an XMPP server or component.
Who is affected
Twisted <= 26.4.0; the reporter confirmed it on 26.4.0. It matters only if your code parses untrusted XML through twisted.words.xish.domish, for example an XMPP server. Check the version:
pip show TwistedTwisted
- Ecosystem
- PyPI
- Affected
- <= 26.4.0
- Fixed in
- 26.10.0rc1
- Check
pip show Twisted
How to fix it
The advisory lists 26.10.0rc1 as patched, which is a release candidate:
pip install --upgrade --pre "Twisted==26.10.0rc1"The fix is pull request 12751. The sources give no other workaround. Consider memory limits (container or cgroup limits) and per-connection resource caps in front of the service so one stream cannot take the host down.
How to tell if you were hit
Watch for processes whose resident memory climbs steadily while a single client connection stays open, followed by an out-of-memory kill in the system log. In XMPP logs, look for a client that opens stream:stream and a container element and sends data for a long time without completing stanzas or authenticating. Review which services in your environment import twisted.words.xish.domish.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
An allocation-without-limits vulnerability in the Twisted XML element stream lets any unauthenticated remote peer exhaust server memory over a single stream. When the peer opens a container element and streams child elements without ever closing the container, every element is materialised into an in-memory tree with no limit on depth or child count. An element is released only when its end tag arrives, so a container the attacker never closes retains everything beneath it until the process is killed.
Details
In ExpatElementStream._onStartElement, each start tag appends a new element to the current element's children and descends into it, with no depth or child-count check:
# src/twisted/words/xish/domish.py (ExpatElementStream._onStartElement)
if self.documentStarted == 1:
if self.currElem != None:
self.currElem.children.append(e) # append child: no depth/count cap
e.parent = self.currElem
self.currElem = e # descend into the new elementAn element is emitted and dropped only when its end tag arrives while it sits directly under the document root, so a container that is never closed keeps every child beneath it. The transport XmlStream.dataReceived feeds bytes to self.stream.parse(data) with no size limit, and in XMPP the stream is parsed during negotiation before authentication.
Affected product: Twisted, twisted.words.xish.domish element stream Affected versions: confirmed against 26.4.0
PoC
On any endpoint that parses untrusted XML streams with this stack, such as an XMPP server, open a stream by sending the opening stream:stream tag and a container element, then stream child elements continuously and never send the container's closing tag. No credentials are required, because in XMPP the stream is parsed before authentication.
Every child is appended to the container and retained because the container is never emitted, and the transport applies no limit on the size of the unfinished document. Because each small element becomes a full object in memory the footprint is many times the traffic sent, so a modest-bandwidth peer, or several such streams, drives the process to memory exhaustion.
Impact
This is an unauthenticated remote denial of service by memory exhaustion. A single stream grows an in-memory element tree without bound, amplified by per-element object overhead, until the operating system kills the server. There is no confidentiality or integrity impact and no code execution. The affected surface is any deployment that parses untrusted XML streams with this stack, such as an XMPP server or component.
Credited to arkmarta.
Questions
- Does CVE-2026-115775 need authentication?
No. In XMPP the stream is parsed during negotiation before authentication, so any remote peer that can connect can trigger it.
- What is the fixed version?
The advisory lists Twisted 26.10.0rc1. Versions up to 26.4.0 are vulnerable; 26.4.0 was confirmed by the reporter.
- Can it lead to code execution or data theft?
No. The advisory describes only denial of service by memory exhaustion.
- Am I affected if I use Twisted but not Twisted Words?
The flaw is in the
domishelement stream in Twisted Words. Without code that parses untrusted XML streams through it, the path is not reachable.
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 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-115776
Twisted: Unauthenticated Remote Denial of Service in the Twisted IRC Server via an Unbounded Line Buffer
high7.5Oct 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
