ZeroHour

CVE-2026-84381

Missing TLS for wss WebSockets Through SOCKS5 Proxies in HTTPX2

CVSS 3.1
8.1 high
EPSS
<1%p0
Published
()
Modified
AI analysis

HTTPX2 (via its httpcore2 transport) fails to start TLS for wss:// WebSocket connections tunneled through a SOCKS5 proxy, because the TLS upgrade condition in the SOCKS proxy handling only recognizes https and does not recognize wss. The flaw is reachable through Client.websocket() and AsyncClient.websocket() in HTTPX2/httpcore2 versions 2.6.0 through 2.9.1 when connecting to a wss origin via a SOCKS5 proxy. As a result, the opening handshake, query parameters, Authorization headers, cookies, and subsequent WebSocket frames cross the proxy path in plaintext without certificate verification, allowing an attacker controlling or observing that path to read or modify traffic and impersonate the WebSocket server. Any Python application using HTTPX2 for WebSocket connections over a SOCKS5 proxy is affected, while users who do not combine wss with a SOCKS5 proxy are not exposed. No public proof-of-concept or in-the-wild exploitation is known, EPSS is low (0.1% over 30 days), and the issue is not in CISA's KEV catalog.

What to do: Upgrade to httpcore2 2.10.0 and HTTPX2 2.10.0 or later, which restore TLS negotiation for wss through SOCKS5 proxies. Until upgraded, avoid using Client.websocket()/AsyncClient.websocket() for wss:// origins reached via SOCKS5 proxies, or ensure sensitive material (Authorization headers, cookies, query parameters) is not sent over those connections. Audit applications and proxy configurations for WebSocket use over SOCKS5 to determine whether credentials or data traversed the proxy in plaintext.

Affected
HTTPX2 project HTTPX22.6.0 through 2.9.1 (fixed in 2.10.0)
httpcore2 project httpcore2prior to 2.10.0 (fixed in 2.10.0)
Estimated exposure
unknown (no public download or install counts for HTTPX2/httpcore2 were provided; exposure is further narrowed to deployments using wss WebSocket connections… — No active-install or download statistics exist in the data for these pip packages, and only the wss-over-SOCKS5 WebSocket code path is vulnerable, so no quantitative order of magnitude can be supported.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

HTTPX2 is a next generation HTTP client for Python. Prior to 2.10.0, httpcore2 fails to start TLS in src/httpcore2/httpcore2/_sync/socks_proxy.py and src/httpcore2/httpcore2/_async/socks_proxy.py when the remote origin uses wss through a SOCKS5 proxy because the TLS upgrade condition only recognizes https. HTTPX2 exposes the flaw through Client.websocket() and AsyncClient.websocket() from 2.6.0 through 2.9.1, so the opening handshake, query parameters, Authorization headers, cookies, and subsequent frames can cross the proxy path in plaintext without certificate verification. An attacker controlling or observing that path can read or modify traffic and impersonate the WebSocket server. This issue is fixed in httpcore2 2.10.0 and HTTPX2 2.10.0.

Ecosystems
pip
Weakness
CWE-319
Vector
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GHSA
GHSA-7mj9-2mp8-4m2p (high)

In the news

No ingested article mentions this CVE yet.