GHSA-82r6-8w77-94w6 CVE-2026-63374 PYSEC-2026-4025
AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
- Severity
- 9.3 / 10
- Critical · CVSS 4.0
- Exploit chance (EPSS)
- 0.29%
- Chance of exploitation in the next 30 days. Higher than 21.50% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-295 Improper Certificate Validation
- CWE-297 Improper Validation of Certificate with Host Mismatch
- Fix
4.14.2- Upgrade anyio to this version or later
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.
Affected versions
PyPI
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
anyio PyPI → 4.14.2
- pip
pip install --upgrade "anyio>=4.14.2"- poetry
poetry add "anyio>=4.14.2"- uv
uv add "anyio>=4.14.2"
Severity breakdown
CVSS 4.0 9.3
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
- Attack vector
- Network
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- None
- User interaction
- None
- Confidentiality (vulnerable system)
- High
- Integrity (vulnerable system)
- High
- Availability (vulnerable system)
- None
- Confidentiality (subsequent systems)
- None
- Integrity (subsequent systems)
- None
- Availability (subsequent systems)
- None
Weakness
CWE-295: Improper Certificate Validation
The product does not validate, or incorrectly validates, a certificate.
How to prevent it
- Architecture and Design, Implementation: Certificates should be carefully managed and checked to assure that data are encrypted with the intended owner's public key.
- Implementation: If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.
CWE-297: Improper Validation of Certificate with Host Mismatch
The product communicates with a host that provides a certificate, but the product does not properly ensure that the certificate is actually associated with that host.
How to prevent it
- Architecture and Design: Fully check the hostname of the certificate and provide the user with adequate information about the nature of the problem and how to proceed.
- Implementation: If certificate pinning is being used, ensure that all relevant properties of the certificate are fully validated before the certificate is pinned, including the hostname.
References
Advisories
Fixes and patches
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-5p39-cfhj-2xmp AnyIO process-pool workers can block indefinitely on undrained stderr | Medium | Also affects anyio |
| GHSA-3w57-8xmc-8v26 AnyIO run_process/open_process ignores extra_groups and can retain parent supplementary groups | High | Also affects anyio |
| GHSA-4487-j8r4-4g2f Forge: verifyCertificateChain() removes trusted CA certificates with the same subject from the CA store | Low | Same weakness, CWE-295 |
| GHSA-5x38-2vff-x55p Forge: X.509 basicConstraints bypass in verifyCertificateChain() via deprecated extension OIDs 2.5.29.10 and 2.5.29.13 | High | Same weakness, CWE-295 |
| EEF-CVE-2026-115693 Custom cacerts or cacertfile do not restrict trust to the pinned CA in hackney | Not rated yet | Same weakness, CWE-295 |
| GHSA-6q48-6c7w-9gw2 certifi bundles emSign root CAs with compromised intermediate CA keys | Critical | Same weakness, CWE-295 |
| GHSA-2m5v-pch6-74hx undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent | Critical | Same weakness, CWE-295 |
| GHSA-vrv5-2jg9-4mmr Microsoft Security Advisory CVE-2026-96222 - .NET Spoofing Vulnerability | High | Same weakness, CWE-295 |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor