# PYSEC-2026-4025: AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing

- Database: PyPA
- Published: 2026-10-01
- Modified: 2026-10-01

## Tracked as

- [CVE-2026-63374](https://cve.now/CVE-2026-63374.md): AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing

## Also published as

- [GHSA-82R6-8W77-94W6](https://cve.now/GHSA-82R6-8W77-94W6.md) (GitHub)

## Affected versions

- anyio (PyPI): fixed in 4.14.2

## Description

### 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.

## References

- https://github.com/agronholm/anyio/security/advisories/GHSA-82r6-8w77-94w6
- https://github.com/agronholm/anyio/pull/1208
- https://github.com/agronholm/anyio/commit/68f58915f82d9be8109ebbbd8f5d70577d43f2ce
- https://github.com/agronholm/anyio
- https://github.com/agronholm/anyio/releases/tag/4.14.2
- https://pypi.org/project/anyio
- https://github.com/advisories/GHSA-82r6-8w77-94w6
- https://nvd.nist.gov/vuln/detail/CVE-2026-63374

Page: https://cve.now/PYSEC-2026-4025

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
