CVE-2026-39821 Invoking failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna
The Go idna library incorrectly accepts ASCII-only Punycode labels, allowing attackers to bypass hostname-based privilege checks and escalate privileges.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-39821?
CVE-2026-39821 is a critical vulnerability in golang.org/x/net/idna, published on 22 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
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".
Weakness: CWE-1289
Which versions are affected by CVE-2026-39821?
2 open source packages ship an affected version, including golang.org/x/net and stdlib. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
golang.org/x/net Go | All versions | 0.55.0 |
stdlib Go | All versions | 1.25.13, 1.26.6, 1.27.0-rc.3 |
Linux distribution packages (38)
git-lfs AlmaLinux:10 | All versions | 3.7.1-5.el10_2.5 |
grafana-pcp AlmaLinux:10 | All versions | 5.3.0-7.el10_2 |
git-lfs AlmaLinux:8 | All versions | 3.4.1-11.el8_10 |
grafana AlmaLinux:8 | All versions | 9.2.10-31.el8_10 |
grafana-pcp AlmaLinux:8 | All versions | 5.1.1-16.el8_10 |
grafana-selinux AlmaLinux:8 | All versions | 9.2.10-31.el8_10 |
git-lfs AlmaLinux:9 | All versions | 3.7.1-4.el9_8.1 |
grafana-pcp AlmaLinux:9 | All versions | 5.1.1-17.el9_8 |
git-lfs Red Hat:enterprise_linux:10.2 | All versions | 0:3.7.1-5.el10_2.5 |
git-lfs-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 0:3.7.1-5.el10_2.5 |
git-lfs-debugsource Red Hat:enterprise_linux:10.2 | All versions | 0:3.7.1-5.el10_2.5 |
grafana-pcp Red Hat:enterprise_linux:10.2 | All versions | 0:5.3.0-7.el10_2 |
grafana-pcp-debuginfo Red Hat:enterprise_linux:10.2 | All versions | 0:5.3.0-7.el10_2 |
grafana-pcp-debugsource Red Hat:enterprise_linux:10.2 | All versions | 0:5.3.0-7.el10_2 |
git-lfs Red Hat:enterprise_linux:8::appstream | All versions | 0:3.4.1-11.el8_10 |
git-lfs-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:3.4.1-11.el8_10 |
git-lfs-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:3.4.1-11.el8_10 |
grafana Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-31.el8_10 |
grafana-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-31.el8_10 |
grafana-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-31.el8_10 |
grafana-pcp Red Hat:enterprise_linux:8::appstream | All versions | 0:5.1.1-16.el8_10 |
grafana-pcp-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:5.1.1-16.el8_10 |
grafana-pcp-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:5.1.1-16.el8_10 |
grafana-selinux Red Hat:enterprise_linux:8::appstream | All versions | 0:9.2.10-31.el8_10 |
git-lfs Red Hat:enterprise_linux:9::appstream | All versions | 0:3.7.1-4.el9_8.1 |
git-lfs-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:3.7.1-4.el9_8.1 |
git-lfs-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:3.7.1-4.el9_8.1 |
grafana-pcp Red Hat:enterprise_linux:9::appstream | All versions | 0:5.1.1-17.el9_8 |
grafana-pcp-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:5.1.1-17.el9_8 |
grafana-pcp-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:5.1.1-17.el9_8 |
ose-aws-ecr-image-credential-provider Red Hat:openshift:4.16::el8 | All versions | 0:4.16.0-202610062120.p2.gac983ec.assembly.stream.el8 |
ose-aws-ecr-image-credential-provider Red Hat:openshift:4.16::el9 | All versions | 0:4.16.0-202610062120.p2.gac983ec.assembly.stream.el9 |
openshift-clients Red Hat:openshift:4.20::el8 | All versions | 0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el8 |
openshift-clients-redistributable Red Hat:openshift:4.20::el8 | All versions | 0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el8 |
openshift-clients Red Hat:openshift:4.20::el9 | All versions | 0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el9 |
openshift-clients-redistributable Red Hat:openshift:4.20::el9 | All versions | 0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el9 |
ose-azure-acr-image-credential-provider Red Hat:openshift:4.22::el8 | All versions | 0:4.22.0-202606291123.p2.ga17a3e3.assembly.stream.el8 |
ose-azure-acr-image-credential-provider Red Hat:openshift:4.22::el9 | All versions | 0:4.22.0-202606291123.p2.ga17a3e3.assembly.stream.el9 |
Products include Golang Net.
How do I fix CVE-2026-39821?
Upgrade golang.org/x/net to 0.55.0 or later.
Is CVE-2026-39821 being exploited?
There is no known exploitation of CVE-2026-39821 in the wild and no public exploit code.
Other vulnerabilities in golang.org/x/net/idna
- CVE-2026-25680 Invoking denial of service when parsing arbitrary HTML in golang.org/x/net/html
- CVE-2026-25681 Invoking incorrect handling of character references in DOCTYPE nodes in golang.org/x/net/html
- CVE-2026-27136 Invoking duplicate attributes can cause XSS in golang.org/x/net/html
- CVE-2026-42502 Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html
- CVE-2026-42506 Invoking incorrect handling of namespaced elements in foreign content in golang.org/x/net/html
Sources
Also known as ALSA-2026:30853, ALSA-2026:30854, ALSA-2026:30855, ALSA-2026:35826, ALSA-2026:35829, ALSA-2026:35830 and 2299 more.