GHSA-f2fp-rgf2-35cp: Medium severity pip/httpx2 vulnerability

Published Sep 8, 2026
·
Updated

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 maxeventsize.

If upgrading is not immediately possible, only consume SSE from trusted endpoints and enforce an external size or time budget on the stream.

Affected Software

1 affected componentFixes available
pip/httpx2>=2.5.0<2.10.0
2.10.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/httpx2 to a version that resolves this vulnerability.

    Fixed in 2.10.0
  2. Upgrade

    Upgrade HTTPX2 to a version that resolves this vulnerability.

    Fixed in 2.10.0
  3. Compensating control

    If upgrading is not immediately possible, only consume SSE from trusted endpoints and enforce an external size or time budget on the stream.

Event History

Sep 8, 2026
Advisory Published
via GitHub·08:45 PM
Data Sourced
via GitHub·08:45 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which HTTPX2 usage is affected?

Only applications using Server-Sent Events through httpx2.Client.sse() or httpx2.AsyncClient.sse() are affected. Other HTTPX2 response APIs do not use the vulnerable SSE parsing path.

2

What must an attacker control to trigger the issue?

The application must consume an SSE stream from an attacker-controlled or compromised endpoint. The endpoint can send one long unterminated line in many small response chunks, causing repeated copying and rescanning of buffered data.

3

How can I determine whether my deployment is affected?

Deployments using an HTTPX2 version before 2.10.0 and calling either SSE API are affected. The resulting CPU consumption can block a synchronous worker or the asynchronous event loop consuming the stream.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203