CVE-2026-132651: Quadratic WebSocket fragment reassembly causes CPU denial of service

Published Dec 4, 2026
·
Updated

httpx2 reassembled fragmented WebSocket messages by appending each continuation frame to a bytes buffer, copying the whole accumulated message on every frame. A WebSocket server, or an on-path attacker on an unencrypted ws:// connection, can split messages into many tiny continuation frames so that reassembly takes time quadratic in the number of frames. Reassembly holds the GIL in the synchronous client and blocks the event loop in the asynchronous client.

Applications are affected when they open a WebSocket session with client.websocket() or httpx2.websocket() to an untrusted endpoint, using httpx2 from 2.6.0 up to (but excluding) 2.18.0. From 2.10.0, the default maxmessagesizebytes limit of 64 KiB bounds the work per message, so sustained load needs many messages; versions 2.6.0 to 2.9.1 have no such limit.

The issue is fixed in 2.18.0, which collects fragments in a list and joins them once when the final frame arrives. Until then, keep maxmessagesizebytes small and connect only to trusted wss:// endpoints.

Affected Software

1 affected component
pypi/httpx2>=2.6.0<2.18.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.18.0
  2. Configuration

    Keep max_message_size_bytes small until upgrading.

    httpx2 max_message_size_bytes = small
  3. Compensating control

    Connect only to trusted wss:// endpoints until upgrading.

Event History

Dec 4, 2026
CVE Published
via MITRE·11:28 AM
Data Sourced
via MITRE·11:28 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this denial-of-service condition?

Applications using httpx2 WebSocket sessions via client.websocket() or httpx2.websocket() to reach untrusted endpoints are affected in versions 2.6.0 through 2.17.x. A malicious WebSocket server can trigger it; an on-path attacker can do so when the connection uses unencrypted ws://.

2

How does the default message-size limit affect exposure?

From version 2.10.0, the default max_message_size_bytes limit is 64 KiB, which bounds work for an individual message, although sustained load can still be created with many messages. Versions 2.6.0 through 2.9.1 have no such limit.

3

What can be done if upgrading to 2.18.0 is not immediately possible?

Keep max_message_size_bytes small and restrict WebSocket connections to trusted wss:// endpoints. This reduces the work an attacker can force per message and prevents on-path manipulation possible with ws://.

4

What is the operational impact for synchronous and asynchronous clients?

In the synchronous client, fragment reassembly holds the GIL. In the asynchronous client, it blocks the event loop, so affected processing can delay other application work.

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