CVE-2026-84381: HTTPX2: Secure WebSocket traffic sent without TLS through SOCKS proxies
HTTPX2 is a next generation HTTP client for Python. Prior to 2.10.0, httpcore2 fails to start TLS in src/httpcore2/httpcore2/sync/socksproxy.py and src/httpcore2/httpcore2/async/socksproxy.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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
httpcore2to a version that resolves this vulnerability.Fixed in 2.10.0 - Upgrade
Upgrade
HTTPX2to a version that resolves this vulnerability.Fixed in 2.10.0
Event History
Frequently Asked Questions
Which deployments are exposed?
HTTPX2 applications using Client.websocket() or AsyncClient.websocket() in versions 2.6.0 through 2.9.1 are exposed when they connect to a wss origin through a SOCKS5 proxy. The affected TLS-start condition is in httpcore2 SOCKS proxy handling before version 2.10.0.
What does an attacker need to exploit this issue?
An attacker must control or be able to observe the network path through the SOCKS proxy. Because TLS is not started for the wss connection, they can read or modify the handshake and WebSocket frames and impersonate the server.
What information or traffic is exposed?
The opening WebSocket handshake, including query parameters, Authorization headers, and cookies, can traverse the proxy path in plaintext. Subsequent WebSocket frames are also sent without certificate verification.
How can the issue be remediated?
Upgrade both HTTPX2 and httpcore2 to version 2.10.0. That version corrects TLS startup for wss connections through SOCKS proxies.