Skip to main content
EPSS 0.1%top 99%

CVE-2026-84381: CWE-319: Cleartext Transmission of Sensitive Information in pydantic httpx2

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

Description

### Summary httpcore2 does not start TLS for `wss://` connections routed through a SOCKS5 proxy. The WebSocket opening handshake and all subsequent frames are sent in plaintext through the proxy path, despite the caller selecting the secure `wss` scheme. The transport flaw affects httpcore2 releases before `2.10.0`. HTTPX2 exposed this behavior through its public `Client.websocket()` and `AsyncClient.websocket()` APIs from `2.6.0` through `2.9.1`. ### Details The synchronous and asynchronous SOCKS5 connection implementations upgrade the established proxy tunnel to TLS only when the remote origin scheme is `https`. The equivalent check does not include `wss`. After the SOCKS5 handshake succeeds, the raw stream is therefore passed directly to the HTTP/1.1 connection, which writes the WebSocket upgrade request without first performing a TLS handshake or verifying the destination certificate. For example, an application using HTTPX2 `2.6.0` through `2.9.1` may open an authenticated WebSocket through a SOCKS proxy: ```python import httpx2 with httpx2.Client(proxy="socks5://proxy.example:1080") as client: with client.websocket( "wss://service.example/private?token=query-secret", headers={"Authorization": "Bearer header-secret"}, cookies={"session": "cookie-secret"}, ) as websocket: websocket.send_text("private message") ``` On affected versions, the stream passing through the SOCKS proxy begins with a plaintext request such as: ```text GET /private?token=query-secret HTTP/1.1 Host: service.example Authorization: Bearer header-secret Cookie: session=cookie-secret ``` Before HTTPX2 `2.6.0`, the same underlying httpcore2 behavior could be reached by integrations constructing a WebSocket upgrade request through the low-level transport API, but HTTPX2 did not yet provide its native WebSocket client API. A normal secure WebSocket server will usually reject these plaintext bytes because it expects a TLS ClientHello. However, a malicious or compromised SOCKS proxy can accept the SOCKS connection, observe the plaintext handshake, return a forged `101 Switching Protocols` response, and then read or modify WebSocket frames in both directions. An observer between the proxy and destination may also read the plaintext traffic. RFC 6455 requires a client using a secure WebSocket connection to perform the TLS handshake before sending the WebSocket opening handshake. A `wss` URI promises confidentiality, integrity, and endpoint authentication through TLS. ### Impact An attacker able to control or observe the SOCKS proxy path can obtain URL query parameters, authorization headers, cookies, and application messages that the caller expected TLS to protect. Because no TLS handshake occurs, certificate verification also does not occur, allowing an attacker controlling the proxy to impersonate the WebSocket server and inject or alter messages. Only `wss://` connections routed through a SOCKS5 proxy are affected. Direct `wss://` connections and ordinary `https://` requests through SOCKS already start TLS correctly. ### Mitigation Upgrade HTTPX2 and httpcore2 to `2.10.0` or later. Patched versions start TLS for both `https` and `wss` origins in the synchronous and asynchronous SOCKS5 connection paths. If upgrading is not immediately possible, do not route `wss://` connections through a SOCKS proxy. Use a direct secure WebSocket connection or another transport that performs and verifies TLS to the WebSocket origin.

CVSS v3.1

Score 8.1high

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

Affected software

pydantic

httpx2

Affected versions
>=2.6.0 <2.10.0

pydantic

httpcore2

Affected versions
<2.10.0

AI-Powered Analysis

Machine-generated threat intelligence

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

Technical Analysis

httpcore2 does not start TLS for wss:// connections routed through a SOCKS5 proxy, causing the WebSocket handshake and frames to be sent in plaintext despite the secure scheme. This affects httpcore2 releases before 2.10.0 and HTTPX2 versions 2.6.0 through 2.9.1, exposing sensitive data to any attacker controlling or observing the SOCKS proxy path. The flaw arises because TLS is only initiated for https schemes, not wss, allowing interception and manipulation of WebSocket traffic. The vulnerability is resolved in httpcore2 and HTTPX2 version 2.10.0 and later.

Potential Impact

An attacker controlling or observing the SOCKS5 proxy can intercept sensitive information transmitted in the WebSocket handshake and subsequent frames, including URL query parameters, authorization headers, cookies, and application messages. Because no TLS handshake occurs, the attacker can impersonate the WebSocket server and inject or alter messages, violating confidentiality and integrity. Direct wss:// connections and https:// requests through SOCKS proxies are not affected.

Mitigation Recommendations

Upgrade HTTPX2 and httpcore2 to version 2.10.0 or later, which correctly initiate TLS for both https and wss origins in SOCKS5 connections. If upgrading immediately is not possible, avoid routing wss:// connections through SOCKS proxies; instead, use direct secure WebSocket connections or transports that perform and verify TLS to the WebSocket origin.

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: 6a986974acd9273b4993d06b

Added to database: 09/02/2026, 18:22:44 UTC

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

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

Views: 120

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