Home

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

PUBLISHED Reserved 2026-04-07 | Published 2026-05-22 | Updated 2026-05-23 | Assigner Go

Problem types

CWE-1289: Improper Validation of Unsafe Equivalence in Input

Product status

Default status
unaffected

Any version before 0.55.0
affected

Credits

KC1zs4 (https://github.com/KC1zs4)

References

go.dev/cl/767220

go.dev/issue/78760

groups.google.com/g/golang-announce/c/iI-mYSI0lu8

pkg.go.dev/vuln/GO-2026-5026

cve.org (CVE-2026-39821)

nvd.nist.gov (CVE-2026-39821)

Download JSON