CVE-2026-39821: CWE-1289: Improper Validation of Unsafe Equivalence in Input in Go standard library net/http
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".
AI Analysis
Technical Summary
The vulnerability arises from improper validation of Punycode-encoded labels in the ToASCII and ToUnicode functions of golang.org/x/net/idna. These functions incorrectly accept Punycode labels that decode to ASCII-only hostnames, returning the ASCII name instead of an error. This behavior can cause privilege escalation in applications that first validate ASCII hostnames and then convert them to Unicode, potentially granting access to hostnames that should have been blocked. The issue is tracked as CWE-1289 (Improper Validation of Unsafe Equivalence in Input). Red Hat's advisory confirms broad exposure across products shipping the Go toolchain or bundling golang.org/x/net, including RHEL, OpenShift, and Ceph components. The vulnerability has a CVSS v3.1 score of 9.6 (critical) with network attack vector, low privileges required, no user interaction, and high confidentiality and integrity impact. Red Hat recommends upgrading to fixed versions of golang.org/x/net that include the idna correction.
Potential Impact
This vulnerability can lead to privilege escalation by allowing attackers to bypass hostname-based access controls. Applications that rely on ASCII hostname validation may incorrectly permit access to restricted hostnames after Unicode normalization, potentially exposing sensitive resources. The impact includes high confidentiality and integrity risks but no availability impact. The vulnerability affects a broad range of products that include the affected Go packages, increasing the potential attack surface.
Mitigation Recommendations
A fix is available. Users and administrators should upgrade to a fixed release of golang.org/x/net that includes the corrected idna package. This can be achieved by updating the Go toolchain or rebuilding dependent packages with the patched version. Red Hat customers should apply the relevant security updates provided in their product advisories. No alternative mitigations are specified, so patching is the recommended remediation.
CVE-2026-39821: CWE-1289: Improper Validation of Unsafe Equivalence in Input in Go standard library net/http
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".
CVSS v3.1
Score 9.6critical
Affected software
Go standard library
net/http
Go standard library
net/http/internal/http2
golang.org/x/net
golang.org/x/net/idna
pkg:golang/net/httppkg:golang/net/http/internal/http2pkg:golang/golang.org/x/net/idnaRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from improper validation of Punycode-encoded labels in the ToASCII and ToUnicode functions of golang.org/x/net/idna. These functions incorrectly accept Punycode labels that decode to ASCII-only hostnames, returning the ASCII name instead of an error. This behavior can cause privilege escalation in applications that first validate ASCII hostnames and then convert them to Unicode, potentially granting access to hostnames that should have been blocked. The issue is tracked as CWE-1289 (Improper Validation of Unsafe Equivalence in Input). Red Hat's advisory confirms broad exposure across products shipping the Go toolchain or bundling golang.org/x/net, including RHEL, OpenShift, and Ceph components. The vulnerability has a CVSS v3.1 score of 9.6 (critical) with network attack vector, low privileges required, no user interaction, and high confidentiality and integrity impact. Red Hat recommends upgrading to fixed versions of golang.org/x/net that include the idna correction.
Potential Impact
This vulnerability can lead to privilege escalation by allowing attackers to bypass hostname-based access controls. Applications that rely on ASCII hostname validation may incorrectly permit access to restricted hostnames after Unicode normalization, potentially exposing sensitive resources. The impact includes high confidentiality and integrity risks but no availability impact. The vulnerability affects a broad range of products that include the affected Go packages, increasing the potential attack surface.
Mitigation Recommendations
A fix is available. Users and administrators should upgrade to a fixed release of golang.org/x/net that includes the corrected idna package. This can be achieved by updating the Go toolchain or rebuilding dependent packages with the patched version. Red Hat customers should apply the relevant security updates provided in their product advisories. No alternative mitigations are specified, so patching is the recommended remediation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- Go
- Date Reserved
- 2026-04-07T18:13:03.526Z
- State
- PUBLISHED
- Vendor Advisory Urls
- [{"url":"https://access.redhat.com/security/cve/CVE-2026-39821","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30855","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30853","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30854","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30651","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:26547","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:26546","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:23262","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:23264","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:33155","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:33160","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:33163","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:33173","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:33183","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:30650","vendor":"Red Hat"}]
Threat ID: 6a1079f0e1370fbb48159db0
Added to database: 05/22/2026, 15:44:48 UTC
Last enriched: 08/14/2026, 13:08:29 UTC
Last updated: 09/14/2026, 22:11:26 UTC
Views: 531
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.