Improper Validation of Certificate with Host Mismatch Affecting anyio package, versions [,4.14.2)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.31% (24th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-ANYIO-19958324
  • published20 Sept 2026
  • disclosed18 Sept 2026
  • creditUnknown

Introduced: 18 Sep 2026

NewCVE-2026-63374  (opens in a new tab)
CWE-295  (opens in a new tab)
CWE-297  (opens in a new tab)

How to fix?

Upgrade anyio to version 4.14.2 or higher.

Overview

anyio is a High level compatibility layer for multiple asynchronous event loop implementations

Affected versions of this package are vulnerable to Improper Validation of Certificate with Host Mismatch via TLSStream.wrap() in src/anyio/streams/tls.py, which resolves international domain names using IDNA 2003 instead of IDNA 2008 when constructing the server_hostname passed to wrap_bio(). Because IDNA 2003 and IDNA 2008 can map the same Unicode label to different ASCII representations, a TLS connection to an internationalized domain name may be established against a certificate whose Subject Alternative Name was encoded under IDNA 2008, causing the hostname verification to succeed against a certificate that does not legitimately cover the intended host. An attacker positioned to present such a certificate can perform a MitM attack against clients connecting to internationalized hostnames.

CVSS Base Scores

version 4.0
version 3.1