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

Critical 9.6 Published Updated

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.

PackageAffectedFixed in
golang.org/x/net GoAll versions0.55.0
stdlib GoAll versions1.25.13, 1.26.6, 1.27.0-rc.3
Linux distribution packages (38)
git-lfs AlmaLinux:10All versions3.7.1-5.el10_2.5
grafana-pcp AlmaLinux:10All versions5.3.0-7.el10_2
git-lfs AlmaLinux:8All versions3.4.1-11.el8_10
grafana AlmaLinux:8All versions9.2.10-31.el8_10
grafana-pcp AlmaLinux:8All versions5.1.1-16.el8_10
grafana-selinux AlmaLinux:8All versions9.2.10-31.el8_10
git-lfs AlmaLinux:9All versions3.7.1-4.el9_8.1
grafana-pcp AlmaLinux:9All versions5.1.1-17.el9_8
git-lfs Red Hat:enterprise_linux:10.2All versions0:3.7.1-5.el10_2.5
git-lfs-debuginfo Red Hat:enterprise_linux:10.2All versions0:3.7.1-5.el10_2.5
git-lfs-debugsource Red Hat:enterprise_linux:10.2All versions0:3.7.1-5.el10_2.5
grafana-pcp Red Hat:enterprise_linux:10.2All versions0:5.3.0-7.el10_2
grafana-pcp-debuginfo Red Hat:enterprise_linux:10.2All versions0:5.3.0-7.el10_2
grafana-pcp-debugsource Red Hat:enterprise_linux:10.2All versions0:5.3.0-7.el10_2
git-lfs Red Hat:enterprise_linux:8::appstreamAll versions0:3.4.1-11.el8_10
git-lfs-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:3.4.1-11.el8_10
git-lfs-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:3.4.1-11.el8_10
grafana Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-31.el8_10
grafana-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-31.el8_10
grafana-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-31.el8_10
grafana-pcp Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-16.el8_10
grafana-pcp-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-16.el8_10
grafana-pcp-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:5.1.1-16.el8_10
grafana-selinux Red Hat:enterprise_linux:8::appstreamAll versions0:9.2.10-31.el8_10
git-lfs Red Hat:enterprise_linux:9::appstreamAll versions0:3.7.1-4.el9_8.1
git-lfs-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:3.7.1-4.el9_8.1
git-lfs-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:3.7.1-4.el9_8.1
grafana-pcp Red Hat:enterprise_linux:9::appstreamAll versions0:5.1.1-17.el9_8
grafana-pcp-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:5.1.1-17.el9_8
grafana-pcp-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:5.1.1-17.el9_8
ose-aws-ecr-image-credential-provider Red Hat:openshift:4.16::el8All versions0:4.16.0-202610062120.p2.gac983ec.assembly.stream.el8
ose-aws-ecr-image-credential-provider Red Hat:openshift:4.16::el9All versions0:4.16.0-202610062120.p2.gac983ec.assembly.stream.el9
openshift-clients Red Hat:openshift:4.20::el8All versions0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el8
openshift-clients-redistributable Red Hat:openshift:4.20::el8All versions0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el8
openshift-clients Red Hat:openshift:4.20::el9All versions0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el9
openshift-clients-redistributable Red Hat:openshift:4.20::el9All versions0:4.20.0-202608101541.p2.g1367d50.assembly.stream.el9
ose-azure-acr-image-credential-provider Red Hat:openshift:4.22::el8All versions0:4.22.0-202606291123.p2.ga17a3e3.assembly.stream.el8
ose-azure-acr-image-credential-provider Red Hat:openshift:4.22::el9All versions0: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.

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.

Is CVE-2026-39821 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free