CVE-2026-84378: HTTPX2: Quadratic SSE line buffering can cause CPU denial of service
HTTPX2 is a next generation HTTP client for Python. From 2.5.0 until 2.10.0, the HTTPX2 Server-Sent Events parser in src/httpx2/httpx2/sse.py repeatedly copies and rescans buffered text in SSELineDecoder.decode() when an attacker-controlled or compromised SSE endpoint splits one unterminated line across many response chunks. The behavior affects httpx2.Client.sse() and httpx2.AsyncClient.sse(), and the total processing work grows quadratically with the line length, allowing a crafted stream to consume excessive CPU and block a synchronous worker or asynchronous event loop. This issue is fixed in version 2.10.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
httpx2to a version that resolves this vulnerability.Fixed in 2.10.0
Event History
Frequently Asked Questions
Which applications are exposed to this issue?
Applications using httpx2.Client.sse() or httpx2.AsyncClient.sse() with affected HTTPX2 versions from 2.5.0 up to, but not including, 2.10.0 are exposed when they consume SSE data from an attacker-controlled or compromised endpoint.
What must an attacker do to trigger the CPU exhaustion?
The attacker must cause the SSE endpoint to send a single unterminated line split across many response chunks. Repeated buffering, copying, and rescanning of that line makes processing work grow quadratically as the line length increases.
What is the operational impact?
A crafted stream can consume excessive CPU. It can block a synchronous worker using Client.sse() or an asynchronous event loop using AsyncClient.sse().
What is the remediation?
Upgrade HTTPX2 to version 2.10.0, which fixes the issue.