Description
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 max_message_size_bytes 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 max_message_size_bytes small and connect only to trusted wss:// endpoints.
Published: 2026-12-04
Score: 5.3 Medium
EPSS: n/a
KEV: No
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Dec 2026 11:30:00 +0000

Type Values Removed Values Added
Description 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 max_message_size_bytes 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 max_message_size_bytes small and connect only to trusted wss:// endpoints.
Title Quadratic WebSocket fragment reassembly causes CPU denial of service
Weaknesses CWE-407
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: Pydantic

Published:

Updated: 2026-12-04T11:28:23.195Z

Reserved: 2026-12-04T11:23:39.750Z

Link: CVE-2026-132651

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-12-04T12:18:32.930

Modified: 2026-12-04T12:18:32.930

Link: CVE-2026-132651

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity