AnyIO, TLSStream IDNA 2003 Host Name Encoding, CVE-2026-63374, Critical -DC-Sep2026-2487

Listen to this Post

AnyIO is a Python library providing a unified asynchronous I/O interface across multiple event loops. The vulnerability CVE-2026-63374 affects versions prior to 4.14.2 and resides in the TLSStream.wrap() function, specifically in how internationalized domain names are resolved during TLS certificate validation. When AnyIO establishes a TLS connection, it encodes non-ASCII hostnames using IDNA 2003 as defined in RFC 3490. However, the correct standard for modern TLS certificate validation is IDNA 2008 as defined in RFC 5890. These two standards map certain Unicode characters to different ASCII representations. An attacker who has already hijacked the network connection through other means can redirect the client to a malicious server. The attacker then obtains a legitimate TLS certificate issued for the IDNA 2003 encoded version of the target domain name. Because AnyIO also encodes the hostname using IDNA 2003 during certificate validation, the certificate presented by the attacker’s server matches the expected hostname and validates successfully. This constitutes improper certificate validation under CWE-295. The CVSS score assigned to this vulnerability is 9.3, indicating critical severity. The attack complexity is high because the attacker must first hijack the underlying TCP connection, but no authentication is required and the attack can be launched remotely. Services using internationalized domain names are the primary targets, particularly those using AnyIO’s connect_tcp() with TLS enabled or directly invoking TLSStream.wrap(). The vulnerability was published on July 7, 2026, and the patch was released in version 4.14.2 on September 18, 2026. The fix introduces an idna2008_resolve() function that correctly encodes hostnames using IDNA 2008 before passing them to wrap_bio for certificate validation. A workaround exists for users who cannot immediately upgrade: encode hostnames manually via the idna package prior to calling connect_tcp() or TLSStream.wrap(). The advisory was reviewed by GitHub and the fix is available in the agronholm/anyio repository. No public exploit code is known to exist at the time of publication, though the technical details are publicly available. The vulnerability is classified under MITRE ATT&CK technique T1587.003 for developing capabilities related to digital certificates. This issue highlights the importance of using the correct internationalization standards in security-critical contexts. Proper certificate validation depends on consistent encoding between the hostname used for connection and the hostname used for validation. Any mismatch, even due to differing IDNA versions, can break the trust chain. AnyIO version 4.14.2 and later versions are unaffected. Users are strongly advised to upgrade immediately or apply the workaround. The vulnerability affects all versions from 1.0.0 through 4.14.1. The dependent package count is 795 with over 871 million downloads in the last month, indicating widespread exposure. The patch also removes the sniffio dependency in version 4.14.2. The edge deploy audit gate for the onyx-dot-app project blocked deployment until the upgrade was applied. The fix commit is available in the anyio repository under issue number 1208. The vulnerability was assigned the identifier GHSA-82r6-8w77-94w6 in the GitHub Advisory Database. The severity is critical due to the potential for complete compromise of TLS trust guarantees.

DailyCVE Form:

Platform: Python
Version: < 4.14.2
Vulnerability: IDNA 2003 spoofing
Severity: Critical
date: Jul 7, 2026

Prediction: Sep 18, 2026

What Undercode Say:

pip show anyio

python -c “import anyio; print(anyio.__version__)”

grep -r “idna” $(python -c “import anyio, os; print(os.path.dirname(anyio.file))”)/_core/_sockets.py

pip install anyio==4.14.2

python -m pip list –outdated | grep anyio

Exploit: (Educational Purposes!)

import anyio

import ssl

async def vulnerable_connect():

context = ssl.create_default_context()

stream = await anyio.connect_tcp(

“xn--bcher-kva.example.com”,

443,

tls=True,

ssl_context=context,

tls_hostname=”bücher.example.com”

)

return stream

async def vulnerable_wrap():

context = ssl.create_default_context()

stream = await anyio.connect_tcp(“bücher.example.com”, 443)

tls_stream = await anyio.TLSStream.wrap(

stream,

ssl_context=context,

hostname=”bücher.example.com”

)

return tls_stream

Protection:

pip install –upgrade anyio>=4.14.2

import idna

import anyio

async def safe_connect():

encoded_host = idna.encode(“bücher.example.com”).decode(“ascii”)

context = ssl.create_default_context()

stream = await anyio.connect_tcp(

encoded_host,

443,

tls=True,

ssl_context=context,

tls_hostname=encoded_host

)

return stream

Impact:

Successful exploitation enables TLS certificate spoofing against any service using AnyIO with internationalized domain names. An attacker who can hijack the network path can present a certificate for the IDNA 2003 encoded form of the target domain and have it validate as legitimate. This allows the attacker to intercept and decrypt sensitive traffic, perform man-in-the-middle attacks, steal credentials, inject malicious content, and completely bypass the integrity guarantees of TLS. The widespread adoption of AnyIO with over 795 dependent packages amplifies the potential blast radius. Organizations using internationalized domain names in Python applications built on AnyIO are at critical risk and must upgrade to version 4.14.2 immediately or apply the idna package workaround.

🎯Let’s Practice Exploiting & Learn Patching For Free:

🎓 Live Courses & Certifications:

Join Undercode Academy for Verified Certifications

🚀 Request a Custom Project:

Secure, high-velocity infrastructure and disruptive technological engineering. Contact our engineering team for high-tier development and proprietary systems:
[email protected]
💎 Smart Architecture | 🛡️ Secure by Design | ⭐ Trusted by Thousands

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top