Advisory

PYSEC-2026-4025

Also known as: CVE-2026-63374, GHSA-82r6-8w77-94w6

Summary

AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing

Details

Impact
Services using internationalized (non-ASCII) domain names are potentially vulnerable to TLS connections made from AnyIO's connect_tcp() 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.

Severity

Not rated by the source.

Dates

Published
2026-10-01 16:38 UTC
Modified
2026-10-01 17:45 UTC

Affected packages and fixes

anyio

PyPI · All systems

Affected

  • introduced 0, fixed 4.14.2 (ecosystem)

Fixed versions

4.14.2

Fix

  • Fixed version 4.14.2
    pip install --upgrade anyio==4.14.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences