CVE-2026-39821

Invoking failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna

State
Published
Severity
9.6 Critical
Published
May 22, 2026
Updated
Sep 17, 2026
Reserved
Apr 7, 2026

Read the record on cve.org

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".

Scores

CVSSScoreVectorSource
3.19.6 CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:NCISA-ADP
3.18.2 HighCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:Nredhat-SADP

Weaknesses

  • CWE-1289 Improper Validation of Unsafe Equivalence in Input

Affected Products

ProductVersions
net/httpGo standard library
  • before 1.25.13Affected
  • 1.26.0-0 to before 1.26.6Affected
  • 1.27.0-0 to before 1.27.0-rc.3Affected
net/http/internal/http2Go standard library
  • before 1.25.13Affected
  • 1.26.0-0 to before 1.26.6Affected
  • 1.27.0-0 to before 1.27.0-rc.3Affected
golang.org/x/net/idnagolang.org/x/net
  • before 0.55.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.