CVE-2026-63374: AnyIO TLSStream IDNA 2003 Host Name Vulnerability

CRITICAL
Advisory Identifier: GHSA-82r6-8w77-94w6
CWE-295 CWE-297
Published
Advisory Summary

CVE-2026-63374 is a CRITICAL tlsstream idna 2003 host name vulnerability (CWE-295: Improper Certificate Validation) affecting AnyIO libraries in the PyPI ecosystem. The issue involves tlsstream idna 2003 host name encoding enables potential tls certificate spoofing. Remediation is available by upgrading affected packages to version 4.14.2.

CVE-2026-63374 at a Glance

CVE Identifier CVE-2026-63374
GHSA Identifier GHSA-82r6-8w77-94w6
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-295: Improper Certificate Validation
Affected Product AnyIO
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-63374

To remediate this vulnerability, upgrade all affected AnyIO dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

anyio fixed: 4.14.2
pip install anyio>=4.14.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show anyio

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-63374, inspect your installed packages using pip:

pip show anyio

Analyze the terminal output to locate any version of AnyIO in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.14.2), your application is affected.

Note: The pip show anyio command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In AnyIO, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2026-63374 Affected AnyIO Versions

1 component(s)
Fixed Versions:
4.14.2
Product / Package Ecosystem Affected Versions Fixed Version
anyio
PyPI
< 4.14.2
4.14.2

References

Frequently Asked Questions

What is CVE-2026-63374?
CVE-2026-63374 is a security vulnerability in AnyIO involving TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing under CWE-295: Improper Certificate Validation.
Which AnyIO versions are affected?
Affected versions include releases prior to 4.14.2 across affected packages: anyio.
What version fixes CVE-2026-63374?
Upgrading to 4.14.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is anyio affected?
Yes, anyio is affected in releases prior to 4.14.2. Upgrade your dependency to 4.14.2 or later.
What CWE is associated with CVE-2026-63374?
CVE-2026-63374 is classified under CWE-295: Improper Certificate Validation (The product does not validate, or incorrectly validates, a certificate.).
How can I check PyPI dependencies for CVE-2026-63374?
Run the dependency tree command: 'pip show anyio'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-82r6-8w77-94w6",
  "modified" : "2026-09-18T17:17:18Z",
  "published" : "2026-09-18T17:17:18Z",
  "aliases" : [ "CVE-2026-63374" ],
  "summary" : "AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing",
  "details" : "### Impact\nServices 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.\n\n### Patches\nThe vulnerability will be patched in v4.14.2.\n\n### Workarounds\nEncode host names via the `idna` package prior to connecting.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "anyio"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.14.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/agronholm/anyio/security/advisories/GHSA-82r6-8w77-94w6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/agronholm/anyio/pull/1208"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/agronholm/anyio/commit/68f58915f82d9be8109ebbbd8f5d70577d43f2ce"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/agronholm/anyio"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/agronholm/anyio/releases/tag/4.14.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-295", "CWE-297" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-18T17:17:18Z",
    "nvd_published_at" : null
  }
}