CVE-2026-63374: Pip/anyio vulnerability
Impact Services using internationalized (non-ASCII) domain names are potentially vulnerable to TLS connections made from AnyIO's connecttcp() or directly via TLSStream.wrap() where the connection has (through other means) been hijacked and redirected to a malicious server. The attacker would obtain a legitimate certificate using the IDNA 2003 encoded version of the domain name and offer it to the connecting client, making the certificate validate properly on the client's end.
Patches The vulnerability will be patched in v4.14.2.
Workarounds Encode host names via the idna package prior to connecting.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/anyioto a version that resolves this vulnerability.Fixed in 4.14.2 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in v4.14.2 - Configuration
Before connecting, encode any internationalized/non-ASCII hostname using the `idna` package (IDNA encoding), and then use the encoded hostname for AnyIO `connect_tcp()`/`TLSStream.wrap()` connections.
AnyIO (idna/hostname handling) Encode host names via idna package prior to connecting = Use the `idna` package to encode internationalized hostnames (IDNA) before calling `connect_tcp()` or `TLSStream.wrap()`
Event History
Frequently Asked Questions
Which deployments are exposed to this issue?
Services are potentially exposed when they connect to internationalized, non-ASCII domain names using AnyIO's connect_tcp() or TLSStream.wrap(). Exploitation additionally requires the connection to be hijacked and redirected to an attacker-controlled server.
What does an attacker need to make certificate validation succeed?
The attacker needs a legitimate certificate for the IDNA 2003-encoded form of the target internationalized domain name. They can then present that certificate from the malicious server after redirecting the connection.
What can be done before upgrading?
Encode host names with the idna package before establishing the connection. The issue is slated to be patched in version 4.14.2.