Invoking failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna
Summary
| CVE | CVE-2026-39821 |
|---|---|
| State | PUBLISHED |
| Assigner | Go |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-05-22 16:16:20 UTC |
| Updated | 2026-05-29 15:26:37 UTC |
| 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 And Classification
Primary CVSS: v3.1 9.6 CRITICAL from ADP
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
EPSS: 0.000500000 probability, percentile 0.159000000 (date 2026-05-28)
Problem Types: CWE-1289 | CWE-1289: Improper Validation of Unsafe Equivalence in Input | CWE-1289 CWE-1289 Improper Validation of Unsafe Equivalence in Input
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | ADP | DECLARED | 9.6 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 9.6 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
ChangedConfidentiality
HighIntegrity
HighAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Golang.orgxnet | Golang.org/x/net/idna | affected 0.55.0 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| pkg.go.dev/vuln/GO-2026-5026 | [email protected] | pkg.go.dev | Vendor Advisory |
| groups.google.com/g/golang-announce/c/iI-mYSI0lu8 | [email protected] | groups.google.com | Mailing List |
| go.dev/issue/78760 | [email protected] | go.dev | Issue Tracking |
| go.dev/cl/767220 | [email protected] | go.dev | Issue Tracking |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: KC1zs4 (https://github.com/KC1zs4) (en)
There are currently no legacy QID mappings associated with this CVE.