Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker controls or compromises SSE endpoint
-
DeliveryClient application calls .sse() and connects
-
ExploitEndpoint returns valid text/event-stream response
-
InstallSingle long data line delivered across thousands of micro-chunks
-
C2Each chunk triggers full buffer rescan in _SSELineDecoder
-
ExecuteQuadratic CPU growth saturates worker thread or event loop
-
ImpactApplication becomes unresponsive
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
|
| Exploitation Conditions | The target application must be running HTTPX2 version 2.5.0 through 2.9.x and must invoke httpx2.Client.sse() or httpx2.AsyncClient.sse() - the vulnerability exists only on the SSE code path, not on ordinary HTTP requests. The attacker must be able to control the response delivered to the client: either by operating the SSE endpoint the client connects to (a malicious third-party service), by compromising a legitimate SSE server the client trusts, or by executing a network-level MITM between the client and a server using plain HTTP. Applications using HTTPX2 exclusively for non-SSE requests, or those connecting only to internal SSE endpoints over TLS with strong certificate pinning, are not exploitable. No authentication is required from the attacker's perspective once endpoint control is established. |
| Impact | The CVSS 3.1 vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H accurately reflects the threat model: the attack is network-delivered and requires no privileges, but AC:H captures the non-trivial prerequisite that the attacker must control or have compromised the SSE endpoint the client connects to. This is a meaningful barrier - the vulnerability cannot be triggered by a passive observer or a random internet scanner, but by a malicious server operator or a successful MITM or supply-chain compromise of a trusted SSE service. The impact is purely availability: CPU saturation of a worker thread or event loop with no confidentiality or integrity consequences. No KEV listing and no public exploit code have been identified. Even a mid-sized development team in kalisz running httpx2-powered microservices against external SSE feeds should treat upgrading to 2.10.0 as standard maintenance rather than emergency response, because real-world risk is gated on the ability to serve a crafted SSE response to the client. Applications that connect exclusively to internal, trusted SSE endpoints face substantially lower residual risk than those proxying or aggregating external SSE sources. |
| Exploit ScenarioDerived | An attacker operates a malicious HTTP server (or performs MITM on a connection to a trusted SSE service) and accepts the client's SSE request. The server returns a valid text/event-stream response and begins streaming a single SSE event whose data line is tens of kilobytes long, delivered in thousands of one-byte chunks. Each chunk causes _SSELineDecoder.decode() to rescan the entire accumulated buffer, and with a 100 KB line split across 100,000 chunks the total character operations reach approximately 5 × 10⁹, consuming the target process's CPU for an extended period and blocking all other processing in the same thread or event loop. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 02, 2026
Quadratic CPU exhaustion in HTTPX2's Server-Sent Events parser allows a malicious or compromised SSE endpoint to deny service to Python applications using httpx2.Client.sse() or httpx2.AsyncClient.sse() in versions 2.5.0 through 2.9.x. The _SSELineDecoder.decode() method in _sse.py repeatedly copies and rescans its entire in-memory buffer each time a new chunk arrives for an unterminated line, producing O(n²) processing work proportional to the length of the crafted line. A crafted stream can consume excessive CPU, blocking a synchronous worker thread indefinitely or starving an asynchronous event loop. No public exploit identified at time of analysis; a vendor-released patch is available in version 2.10.0.
RemediationAI
Upgrade to HTTPX2 version 2.10.0, which is the vendor-released patch confirmed by the tagged GitHub release at https://github.com/pydantic/httpx2/releases/tag/v2.10.0 and the associated commit cbfc0e04ef6507da29ccbb3b9c2e5b23dd693414. Version 2.10.0 caps per-event buffering at 1 MiB by default and raises SSEError when the limit is exceeded. The cap can be tuned via the max_event_size parameter on .sse() - increasing it above the default raises exposure to larger payloads, while setting max_event_size=None disables the guard entirely and should be avoided. For applications that cannot upgrade immediately, restricting .sse() usage to internal or fully-trusted SSE endpoints and enforcing network egress controls that prevent connections to arbitrary external SSE servers will reduce the attack surface. No per-request workaround exists in versions prior to 2.10.0 without patching the library.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
HTTPX2 (CPE cpe:2.3:a:pydantic:httpx2:*:*:*:*:*:*:*:*), developed by the pydantic organization, is a next-generation Python HTTP client with built-in Server-Sent Events support. The SSE parser is implemented across _sse.py (_SSELineDecoder, _SSEDecoder, EventSource) and exposed via the .sse() context manager on both the synchronous Client and asynchronous AsyncClient. The root cause is CWE-407 (Inefficient Algorithmic Complexity): _SSELineDecoder.decode() was not bounding the buffer it accumulates for an in-progress (unterminated) line, and each new chunk triggered a full rescan of the accumulated text. Because work scales as O(n²) with line length, an endpoint that sends one extremely long line fragmented across many small chunks can drive CPU consumption to impractical levels. The fix in 2.10.0 introduces a DEFAULT_MAX_EVENT_SIZE_BYTES constant of 1 MiB, a per-event byte counter in _SSEDecoder, and a check_pending() method on EventSource that also counts bytes buffered for the current unterminated line, raising SSEError when the threshold is exceeded.
Know when Httpx2 gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
AC:H reflects mandatory endpoint control by the attacker; A:H captures full event-loop starvation with no confidentiality or integrity impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
HTTPX2's SOCKS5 proxy implementation omits TLS negotiation for WebSocket Secure (wss://) origins, exposing the full WebS
Memory exhaustion via unbounded decompression in HTTPX2 (all versions before 2.12.0) allows any HTTP server the client c
HTTP request smuggling in pydantic's HTTPX2 Python client library, all versions prior to 2.11.0, arises because Request.
CRLF injection in httpx2 (pydantic's next-generation Python HTTP client) before v2.11.0 allows manipulation of multipart
EUVD-2026-70242
GHSA-f2fp-rgf2-35cp
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB