PYSEC-2026-4025

See a problem?
Import Source
https://github.com/pypa/advisory-database/blob/main/vulns/anyio/PYSEC-2026-4025.yaml
JSON Data
https://api.osv.dev/v1/vulns/PYSEC-2026-4025
Aliases
Published
2026-10-01T16:38:33Z
Modified
2026-10-01T17:45:01Z
Severity
  • 9.3 (Critical) CVSS_V4 - 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 CVSS Calculator
Summary
AnyIO: TLSStream IDNA 2003 host name encoding enables potential TLS certificate spoofing
Details

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.

References

Affected packages

PyPI / anyio

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
4.14.2

Affected versions

1.*
1.0.0a1
1.0.0a2
1.0.0b1
1.0.0b2
1.0.0rc1
1.0.0rc2
1.0.0
1.1.0
1.2.0
1.2.1
1.2.2
1.2.3
1.3.0
1.3.1
1.4.0
2.*
2.0.0b1
2.0.0b2
2.0.0rc1
2.0.0rc2
2.0.0
2.0.1
2.0.2
2.1.0
2.2.0
3.*
3.0.0rc1
3.0.0rc2
3.0.0rc3
3.0.0rc4
3.0.0
3.0.1
3.1.0
3.2.0
3.2.1
3.3.0
3.3.1
3.3.2
3.3.3
3.3.4
3.4.0
3.5.0
3.6.0
3.6.1
3.6.2
3.7.0rc1
3.7.0
3.7.1
4.*
4.0.0rc1
4.0.0
4.1.0
4.2.0
4.3.0
4.4.0
4.5.0
4.5.1
4.5.2
4.6.0
4.6.1
4.6.2
4.6.2.post1
4.7.0
4.8.0
4.9.0
4.10.0
4.11.0
4.12.0
4.12.1
4.13.0
4.14.0
4.14.1

Database specific

source
"https://github.com/pypa/advisory-database/blob/main/vulns/anyio/PYSEC-2026-4025.yaml"