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

GHSA-vpp8-g58w-m8mp: Twisted: Unauthenticated Remote Denial of Service in the Twisted HTTP/2 Server via Rapid Stream Reset

highCVSS 3.1 7.5

The Twisted HTTP/2 server, up to 26.4.0, is open to the Rapid Reset attack. An unauthenticated client can send HEADERS with END_STREAM and then RST_STREAM in a tight loop on one connection and saturate a CPU core. The patched version is 26.10.0rc1, a release candidate.

Published Oct 29, 2026 · Analysis Oct 31, 2026

What an attacker can do

In H2Connection.dataReceived, the h2 events for one received segment are handled in order. A HEADERS frame with END_STREAM followed by RST_STREAM yields RequestReceived, StreamEnded and StreamReset. Twisted dispatches and renders the request on StreamEnded, before the reset is processed. Only then does _requestAborted free the stream. A freed stream never counts toward the 100-stream concurrency limit, and nothing in _http2.py counts or limits resets. The earlier flood fix covers only outbound control-frame buffering, not this path.

An attacker needs only network access to a Twisted HTTP/2 endpoint. No credentials are needed. By sending pairs of frames at line rate on one connection, the attacker forces the server to render every cancelled request. Work grows with the number of pairs, and the connection is never throttled or closed. A client that holds streams open gets closed at the stream limit, but this pattern avoids it.

The effect is denial of service by CPU exhaustion with a small amount of traffic. There is no confidentiality or integrity impact and no code execution. Only services that serve HTTP/2 through twisted.web are affected, for example behind TLS with h2 negotiation on; HTTP/1.1-only services are not.

Who is affected

The Twisted pip package up to and including 26.4.0, when twisted.web serves HTTP/2. The reporter confirmed 26.4.0. If your service does not enable HTTP/2, or terminates HTTP/2 at a proxy and speaks HTTP/1.1 to Twisted, this path is not reachable.

pip show twisted
pip show h2

HTTP/2 in Twisted needs the optional http2 extra, so check whether the h2 package is installed.

Twisted

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 the patched version. It is a release candidate, so pin it deliberately.

pip install --pre "Twisted[http2]==26.10.0rc1"

The fix (pull request 12749) adds a per-connection token bucket in H2Connection._requestAborted with a burst of 1000 tokens and a refill of 33 per second. Each peer-initiated reset costs one token. When the bucket is empty the server closes the connection with GOAWAY and the ENHANCE_YOUR_CALM error code. Resets started by the server cost nothing, and the values are private constants with no setting to change them. The sources give no other workaround; a proxy that terminates HTTP/2 and limits resets in front of Twisted also removes the exposure.

How to tell if you were hit

Watch for a Twisted worker pinned at 100 percent CPU while network traffic stays low, and for one client connection that opens and resets a very large number of streams. Request logs may show a flood of requests from one address, many with no response sent because the client cancelled. After upgrading, look for connections closed with GOAWAY and ENHANCE_YOUR_CALM, which shows the new limit firing. Packet captures show HEADERS frames with END_STREAM each followed at once by RST_STREAM.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

An uncontrolled-resource-consumption vulnerability (CWE-400) in the Twisted HTTP/2 server lets any unauthenticated remote client exhaust server CPU over a single connection. A client that sends a request header block with END_STREAM and then immediately resets the stream makes the server route and render the request before it processes the reset. Reset streams are freed and never count against the concurrent-stream limit, and no reset-rate limiter exists, so the pattern can be repeated at line rate on one connection. This is the HTTP/2 Rapid Reset class, CVE-2023-44487.

Details

For one received segment the h2 events are processed in order in H2Connection.dataReceived. A HEADERS(END_STREAM) followed by RST_STREAM yields RequestReceived, StreamEnded, then StreamReset, so the request is dispatched and rendered on stream end before the reset is handled:

# src/twisted/web/_http2.py  (H2Connection.dataReceived)
for event in events:
    if isinstance(event, h2.events.RequestReceived):
        self._requestReceived(event)     # allocate the request
    elif isinstance(event, h2.events.StreamEnded):
        self._requestEnded(event)        # -> requestComplete -> render() synchronously
    elif isinstance(event, h2.events.StreamReset):
        self._requestAborted(event)      # processed last, frees the stream

_requestAborted frees the reset stream, so it never occupies the 100-stream concurrency budget, and nothing in _http2.py counts or throttles opened-and-reset streams. The 2019 flood fix (GHSA-32gv) bounds outbound control-frame buffering only and does not apply to this path.

Affected product: Twisted, twisted.web HTTP/2 server Affected versions: confirmed against 26.4.0

PoC

On any Twisted HTTP/2 endpoint, open one connection and, in a tight loop, send a HEADERS frame with END_STREAM on a fresh stream identifier immediately followed by a RST_STREAM for that stream, at line rate. No credentials are required. The server renders each request on stream end before the reset frees the stream, and a freed stream never counts toward the concurrent-stream limit, so the loop is never throttled.

Because every cancelled stream is still dispatched in full and reset streams do not accumulate, the connection is never throttled or closed, so the forced work grows with the number of pairs sent. Sustained on one connection this saturates a CPU core under only a trickle of traffic, whereas a client that instead leaves its streams open is closed once it reaches the concurrent-stream limit.

Impact

This is an unauthenticated remote denial of service (CWE-400, CWE-770) by CPU exhaustion. One connection forces unbounded request rendering at a few frames per cancelled request, bypassing the concurrent-stream limit. It is the HTTP/2 Rapid Reset class (CVE-2023-44487), not covered by the earlier Twisted flood fix, with no confidentiality or integrity impact and no code execution.

Credited to arkmarta.

Questions

Is this the same as CVE-2023-44487?

It is the same class of attack, HTTP/2 Rapid Reset. The advisory says Twisted's earlier flood fix did not cover this path, so Twisted needed its own fix.

Which version of Twisted fixes it?

26.10.0rc1, a release candidate, per the advisory. Versions up to and including 26.4.0 are affected.

Does it need authentication?

No. Any remote client that can open an HTTP/2 connection to the Twisted server can use it.

Is it exploited in the wild?

No source reports exploitation of this Twisted flaw, and it is not in CISA's KEV catalog.

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