Skip to main content
EPSS 0.3%top 77%

CVE-2026-84378: CWE-407: Inefficient Algorithmic Complexity in pydantic httpx2

0
Medium
Published: 10/04/2026 (10/04/2026, 11:46:48 UTC)
Source: CVE Database V5
Vendor/Project: pydantic
Product: httpx2

Description

### Summary HTTPX2's Server-Sent Events (SSE) parser repeatedly copied and rescanned buffered text when a server split one unterminated line across many response chunks. The total work grows quadratically with the length of the line. An attacker-controlled or compromised SSE endpoint can exploit this behavior to consume excessive client CPU. ### Details Before version 2.10.0, HTTPX2 combined the complete pending SSE line with each newly received chunk and then scanned the combined text for line separators. If an SSE server sends a long line as many small chunks without a line separator, every chunk causes all previously received text to be copied and scanned again. For `n` fixed-size chunks, this results in O(n²) processing. The behavior affects both `httpx2.Client.sse()` and `httpx2.AsyncClient.sse()`. Other response APIs do not use the SSE parsing path. ### Impact Applications that consume SSE from an attacker-controlled or compromised endpoint can experience excessive CPU usage. A crafted stream can block a synchronous worker or the asynchronous event loop that is consuming it, degrading availability for other work in that process. Confidentiality and integrity are not affected. ### Mitigation Upgrade to HTTPX2 2.10.0 or later. SSE parsing now accumulates incomplete line fragments and combines them only when necessary, making processing linear in the amount of received data. HTTPX2 2.10.0 also limits buffered SSE events to 1 MiB by default through `max_event_size`. If upgrading is not immediately possible, only consume SSE from trusted endpoints and enforce an external size or time budget on the stream.

CVSS v3.1

Score 5.9medium

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected software

pydantic

httpx2

Affected versions
>=2.5.0 <2.10.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/29/2026, 05:03:59 UTC

Technical Analysis

HTTPX2 versions before 2.10.0 have an inefficient SSE parser that concatenates the entire pending line with each new chunk and rescans it for line separators. When an SSE server sends a long line split into many small chunks without line separators, this results in O(n²) processing time due to repeated copying and scanning. This affects both httpx2.Client.sse() and httpx2.AsyncClient.sse() methods. An attacker-controlled or compromised SSE endpoint can exploit this to cause excessive CPU usage on the client, potentially blocking synchronous workers or asynchronous event loops. The vulnerability does not affect confidentiality or integrity. The issue is fixed in httpx2 2.10.0 by accumulating incomplete line fragments more efficiently and limiting buffered SSE event size to 1 MiB by default.

Potential Impact

Exploitation of this vulnerability can cause excessive CPU consumption on clients consuming SSE streams from attacker-controlled or compromised endpoints. This can degrade availability by blocking synchronous workers or asynchronous event loops processing the SSE stream. There is no impact on confidentiality or integrity of data.

Mitigation Recommendations

Upgrade to httpx2 version 2.10.0 or later, which contains an improved SSE parser with linear processing time and a default 1 MiB limit on buffered SSE event size. If upgrading immediately is not possible, only consume SSE from trusted endpoints and enforce external size or time limits on the SSE stream to mitigate excessive resource consumption.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-09-01T16:27:58.130Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 6a986636acd9273b498ff4df

Added to database: 09/02/2026, 18:08:54 UTC

Last enriched: 09/29/2026, 05:03:59 UTC

Last updated: 10/17/2026, 18:48:23 UTC

Views: 125

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses