---
schema_version: '1.0'
id: security-20261002-71541d
title: 'CVE-2026-63374: AnyIO: TLSStream IDNA 2003 host name encoding enables potential
  TLS certificate spoofing'
url: https://osv.dev/vulnerability/PYSEC-2026-4025
url_hash: 71541d27647fd4759af22a870714a1fae785e199d75ae4f8a21c38160ceea280
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-4025
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-63374
- PYSEC-2026-4025
- severity:CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
- anyio
- PyPI
lang: en
published_at: '2026-10-01T16:38:33Z'
fetched_at: '2026-10-02T04:02:59.527849Z'
updated_at: '2026-10-02T05:03:43Z'
status: published
content_hash: 3dbd4cdf74c9b09019c51e09a9c0cb352cd3a35c1857aaeeac723b99317dac89
content_changed_at: null
license_note: full
summary: 'AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate
  spoofing'
summary_source: rss
summary_en: 'AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate
  spoofing'
summary_omitted_reason: null
redistribution: true
keywords_en:
- anyio
- certificate
- cve
- CVE-2026-63374
- CVE-2026-87817
- enables
- encoding
- host
- Host Broadcast Services
- IDNA
- Kidnapped Civilians
- library vulnerability
- name
- potential
- PyPI
- PYSEC-2026-4025
- severity:CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
- software security
- spoofing
- TLS
- TLSStream
entities_en:
- name: CVE-2026-87817
  type: event
- name: Host Broadcast Services
  type: organization
- name: Kidnapped Civilians
  type: concept
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE-2026-87817
  type: event
- name: Kidnapped Civilians
  type: concept
- name: Host Broadcast Services
  type: organization
key_facts: []
related: []
related_auto:
- name: GitPython
  type: concept
  weight: 1.0
- name: hooks/pre-commit
  type: artifact
  weight: 1.0
- name: GitHub Security Advisory
  type: content
  weight: 1.0
- name: Armed Forces of Nigeria
  type: organization
  weight: 1.0
computed_at: '2026-10-02T05:03:42Z'
---

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

## TL;DR
AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing

## Key Points
- cve / CVE-2026-63374 / PYSEC-2026-4025 / severity:CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N / anyio / PyPI

## Details
**Severity:** CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
**Advisory:** PYSEC-2026-4025 (CVE-2026-63374)

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

**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

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-4025_

## Source
元記事: [CVE-2026-63374: AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing](https://osv.dev/vulnerability/PYSEC-2026-4025) — published 2026-10-01T16:38:33Z
