Skip to main content

AnyIO CVE-2026-63374

| EUVDEUVD-2026-84522 CRITICAL
Improper Certificate Validation (CWE-295)
2026-09-18 https://github.com/agronholm/anyio GHSA-82r6-8w77-94w6
Critical
Disputed · 9.3 Vendor: https://github.com/agronholm/anyio
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Gain on-path/MITM position
  2. Delivery
    Obtain valid cert for IDNA-2003 form of target IDN
  3. Exploit
    Redirect victim's TLS connection to attacker server
  4. Execution
    Present spoofed certificate accepted by IDNA-2003 match
  5. Impact
    Decrypt and modify TLS traffic

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
Exploitation Conditions

Exploitation requires ALL of: (1) the client uses AnyIO <4.14.2 calling connect_tcp() with tls=True or TLSStream.wrap() with a non-ASCII internationalized hostname whose IDNA 2003 ASCII form differs from its IDNA 2008 form (e.g. 'faß.de'→'fass.de' vs 'xn--fa-hia.de'); (2) the attacker already holds an on-path/MITM position able to hijack and redirect the target TCP/TLS connection - this is NOT provided by the vulnerability itself; and (3) the attacker can obtain a legitimate CA-issued certificate for the IDNA-2003 encoded domain. Limiting factors: services using only ASCII hostnames are unaffected, and the workaround (pre-encoding the host via the idna package before connecting) fully mitigates without upgrading.

Impact

The vendor CVSS 4.0 score of 9.3 (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H) presents this as a trivially exploitable, unauthenticated network attack, but the description contradicts that framing: exploitation is only possible where the connection 'has (through other means) been hijacked and redirected to a malicious server.' That MITM/redirect prerequisite is a genuine attack requirement that the vendor scored as AT:N and AC:L - the real complexity is high, not low. Additional narrow preconditions further reduce practical risk: the target service must use an internationalized (non-ASCII) domain name whose IDNA 2003 encoding differs from IDNA 2008 (the canonical example is 'faß.de' encoding to 'fass.de' under IDNA 2003 but 'xn--fa-hia.de' under 2008), and the attacker must be able to obtain a legitimate CA-issued certificate for the IDNA 2003 form. No EPSS score, KEV listing, or public POC was provided, and the flaw is confidentiality/integrity of the TLS channel (VA:N), not code execution. Net: despite the 9.3, this is a conditional certificate-spoofing weakness gated on an existing MITM position plus a specific class of IDN domain - a real defect worth patching in the affected dependency chain, but not a mass-exploitable internet-facing bug. The 'Information Disclosure' framing understates that traffic integrity (injection/modification) is also compromised once spoofing succeeds.

Exploit ScenarioDerived

A Python service connects via AnyIO's connect_tcp(tls=True) or TLSStream.wrap() to an internationalized domain such as 'faß.de'. An attacker who can already redirect/hijack the TCP connection (DNS poisoning, rogue Wi-Fi, BGP/on-path position) obtains a valid certificate for the IDNA-2003 form 'fass.de', presents it, and AnyIO's stdlib-based IDNA 2003 matching validates it successfully - letting the attacker decrypt and tamper with the session. No public exploit code was identified, and success depends on holding an on-path position.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Sep 22, 2026

TLS certificate validation bypass in AnyIO (pip/anyio) versions before 4.14.2 lets an attacker who already holds an on-path man-in-the-middle position impersonate a server named with a non-ASCII internationalized domain name. AnyIO's TLSStream.wrap() encoded the target host name with IDNA 2003 (via the Python standard library) instead of IDNA 2008 before matching it against the peer certificate, so a host like 'faß.de' was compared against the certificate for 'fass.de' - an attacker can obtain a legitimately CA-issued certificate for that wrong domain and have it validate on the client. Exploitation requires all three of: an application calling connect_tcp(tls=True) or TLSStream.wrap() with an affected unicode host name, a pre-existing connection hijack/redirect the vulnerability does not itself provide, and attacker acquisition of a valid certificate for the IDNA 2003-encoded name; ASCII-only host names are unaffected. No public exploit code has been identified at time of analysis, and patched version 4.14.2 is available.

Earlier versions of this analysis (1)
v1 Sep 18, 2026 - 17:51

Incorrect TLS hostname verification in the AnyIO Python library versions before 4.14.2 causes internationalized (non-ASCII) host names to be matched against the peer certificate using IDNA 2003 encoding from the standard library instead of IDNA 2008, so a host name like 'faß.de' is validated as 'fass.de' and an attacker holding a certificate for the wrong domain can pass certificate validation. This is not a remote unauthenticated code-execution bug: it is a certificate validation weakness (CWE-295) that only matters to applications using connect_tcp(tls=True) or TLSStream.wrap() with a divergent IDN host name and only when an attacker has already hijacked or redirected the connection at the network layer (DNS spoofing, BGP hijack, rogue access point) and can obtain a CA-issued certificate for the IDNA 2003 form of the name. The vendor-rated severity was not published (CVSS N/A), so an independent assessment gives CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N, reflecting unauthenticated exploitation but high attack complexity and prerequisite network position. No public exploit code or in-the-wild exploitation was identified at time of analysis, and a vendor-released patch (4.14.2) is available.

RemediationAI

Upgrade to AnyIO 4.14.2, the vendor-released patch version, which pre-encodes unicode host names with IDNA 2008/UTS#46 before TLS certificate matching (fix in PR https://github.com/agronholm/anyio/pull/1208 and commit https://github.com/agronholm/anyio/commit/68f58915f82d9be8109ebbbd8f5d70577d43f2ce; advisory https://github.com/agronholm/anyio/security/advisories/GHSA-82r6-8w77-94w6). The vendor-documented workaround, which fully mitigates without upgrading, is to encode host names through the third-party idna package (e.g. idna.encode(host, uts46=True)) before passing them to connect_tcp() or TLSStream.wrap(); this forces the correct IDNA 2008 A-label and closes the mismatch, at the cost of every call site having to adopt it consistently - any application path left un-encoded remains exposed. Organizations that cannot patch or re-encode promptly should treat the issue as a defense-in-depth problem: pin or explicitly validate expected server certificates and restrict outbound TLS to known destinations, since the residual exposure depends on an attacker already controlling the network path. Because the underlying prerequisite is an on-path/redirect position, network-layer protections (certificate pinning, strict egress filtering, encrypted DNS) meaningfully reduce exploitability but do not repair the application-level name-matching defect.

Affected VersionsENISA

anyio < 4.14.2

Affected Packages

pypi anyio fix: 4.14.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-295 (Improper Certificate Validation), specifically a host-name matching discrepancy rooted in the two competing IDNA standards for converting unicode domain names to ASCII (A-labels/Punycode). AnyIO delegated host-name-to-ASCII conversion for certificate matching to the Python standard library's encodings.idna, which implements IDNA 2003 (RFC 3490) rather than IDNA 2008 (RFC 5890/5891). The two standards disagree on several mappings - the canonical example in the upstream test suite being 'faß.de', which IDNA 2008 encodes to the correct 'xn--fa-hia.de' but IDNA 2003 maps to the entirely different domain 'fass.de'. The library already used IDNA 2008 (via the third-party idna package with UTS#46 processing) inside connect_tcp()'s getaddrinfo path, but TLSStream.wrap() passed the raw hostname string straight to ssl.SSLContext.wrap_bio(server_hostname=...) - and it is the standard library's ssl module that applies IDNA 2003 when server_hostname is a str. The result is that the peer certificate is validated against the wrong expected identity. The fix (PR #1208, commit 68f58915f82d9be8109ebbbd8f5d70577d43f2ce) extracts an idna2008_resolve() helper and pre-encodes the hostname to bytes with idna.encode(host, uts46=True) in wrap(), so ssl receives an already-encoded ASCII name and never falls back to IDNA 2003. Note that this is a name-resolution/validation logic flaw, not a memory-safety or cryptographic failure: the TLS stack itself behaves correctly once given the right expected name.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Medium–Critical)
Vendor (https://github.com/agronholm/anyio) PRIMARY 9.3 CRITICAL
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
vuln.today AI 7.4 HIGH

AC:H because success needs an existing MITM redirect plus a mismatched-IDNA domain and a cert for the 2003 form; no auth (PR:N); confidentiality and integrity of the TLS session are lost, availability unaffected.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Red Hat 7.4 MEDIUM

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorVendor: https://github.com/agronholm/anyio

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Sep 22, 2026 - 16:28 vuln.today
v2 - CVSS changed
CVSS changed
Sep 22, 2026 - 16:22 NVD
9.3 (CRITICAL)
CVE Published
Sep 18, 2026 - 17:17 cve.org
CRITICAL

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 448 pypi packages depend on anyio (64 direct, 390 indirect)

Ecosystem-wide dependent count for version 4.14.2.

Technical POC Analysis

CWE-295: Improper Certificate Validation.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A critical TLS certificate validation flaw in AnyIO, a widely used Python asynchronous networking library, could let a network-positioned attacker impersonate legitimate servers in Python applications that connect to internationalized (non-ASCII) domain names over TLS, enabling interception of credentials and sensitive data. Affected organizations are those running Python services that use AnyIO for outbound TLS connections to such hostnames, and the library is frequently pulled in transitively through frameworks and HTTP clients, so exposure may be broader than direct dependency lists suggest. Because exploitation requires an attacker to already occupy the network path, or to redirect the connection, and to obtain a valid certificate for the mismatched name, the practical risk is elevated rather than immediate - but the dependency's ubiquity and the severity rating warrant prompt remediation.

Business Impact: Medium
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 76% exploitable
Prevalence
High
AnyIO is a foundational async dependency of httpx, Starlette, FastAPI, and SDKs
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Medium

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 SUSE Linux Enterprise Module for Python 3 15 SP7 SUSE Linux Enterprise Server 15 SP7 SUSE Linux Enterprise Server for SAP Applications 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4 SUSE Linux Enterprise Module for Public Cloud 15 SP4 SUSE Linux Enterprise Server 15 SP4 SUSE Manager Proxy 4.3 SUSE Manager Retail Branch Server 4.3 SUSE Manager Server 4.3 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy