CVE-2026-84378

HTTPX2: Quadratic SSE line buffering can cause CPU denial of service

Published Sep 2, 2026 CVSS 3.1 · 5.9 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability resides in the Server‑Sent Events parser of HTTPX2. When an attacker‑controlled or compromised SSE endpoint sends a single very long, unterminated line split across many chunks, the _SSELineDecoder repeatedly copies and rescans the buffered text, causing the total work to grow quadratically with the line length. This excessive CPU processing can block a synchronous worker or an asynchronous event loop, effectively denying service to legitimate requests. The weaknesses, listed as CWE-407 and CWE-606, allow an adversary to exhaust a client’s processing resources without affecting confidentiality or integrity of data.

Affected Systems

The affected product is pydantic’s HTTPX2 client library. Versions from 2.5.0 up to but not including 2.10.0 are vulnerable. The issue was resolved in release 2.10.0, so any installation using a prior version is impacted.

Risk and Exploitability

The CVSS v3.1 score of 5.9 indicates moderate severity. EPSS data is not available, and the vulnerability is not listed in CISA’s KEV catalog. An attacker can exploit this flaw by controlling an SSE endpoint that the HTTPX2 client communicates with, or by compromising a third‑party endpoint that the client connects to. No elevated privileges are required; the condition is simply that the client processes SSE data. Given the moderate CVSS score and the absence of widespread exploitation data, the risk is considered moderate but still significant for systems where CPU usage is a critical resource.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade httpx2 to version 2.10.0 or later, which contains the patch that eliminates the quadratic buffering bug.
  • Ensure that the SSE streams processed by httpx2.Client.sse() or httpx2.AsyncClient.sse() originate from trusted and authenticated endpoints, reducing the chance that a malicious source can trigger the vulnerability.
  • If an upgrade is temporarily infeasible, run the httpx2 client in a CPU‑limited or isolated environment (e.g., container or virtual machine) to mitigate the impact of potential denial‑of‑service attacks.

Generated by OpenCVE AI on September 3, 2026 at 13:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-f2fp-rgf2-35cp HTTPX2: Quadratic SSE line buffering can cause CPU denial of service
History
Type Values Removed Values Added
First Time appeared Pydantic
Pydantic httpx2
Vendors & Products Pydantic
Pydantic httpx2
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title HTTPX2: Quadratic SSE line buffering can cause CPU denial of service
Weaknesses CWE-407
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-606

    Unchecked Input for Loop Condition

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 2, 2026, 7:00 PM
Reserved
Sep 1, 2026, 4:27 PM
Status
Awaiting Analysis
Published
Sep 2, 2026, 6:21 PM
Modified
Sep 9, 2026, 9:05 PM
Severity
Moderate
Public date
Sep 2, 2026, 5:54 PM