CVE-2026-39821
CWE-1289Published: May 22, 2026· Updated: Jul 17, 2026
Official Description
The ToASCII and ToUnicode functions incorrectly accept Punycode-encoded labels that decode to an ASCII-only label. For example, ToUnicode("xn--example-.com") incorrectly returns the name "example.com" rather than an error. This behavior can lead to privilege escalation in programs using the idna package. For example, a program which performs privilege checks on the ASCII hostname may reject "example.com" but permit "xn--example-.com". If that program subsequently converts the ASCII hostname to Unicode, it will inadvertently permits access to the Unicode name "example.com".
Risk Analysis
This critical vulnerability in the idna package allows for privilege escalation due to incorrect handling of Punycode-encoded labels. The ToASCII and ToUnicode functions improperly accept Punycode that decodes to an ASCII-only label, which can trick programs performing privilege checks. With a CVSS score of 9.6, this flaw can lead to an attacker gaining elevated permissions.
No public exploit is currently known for this vulnerability. The attack can be performed remotely (AV:N) with low privileges (PR:L) and no user interaction (UI:N).
Update the idna package to a version that correctly validates Punycode-encoded labels. Developers should ensure their applications using idna are updated and review any privilege checks that rely on hostname validation.
Technical Analysis
CVE-2026-39821 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.
Exploitation requires low privileges, which limits the exposure to scenarios where an attacker has already gained initial access.
A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), with a CVSS base score of 9.6.
The vulnerability has a "Changed" scope, meaning successful exploitation can impact components beyond the vulnerable component itself — such as the host operating system or adjacent services.
CVSS v3.1 Vector Breakdown
Affected Vendors & Products
Exploit & PoC Resources
Official Patches & Advisories
All References (63)
Quick Facts
Related CVEs (CWE-1289)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2026-39821 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts