Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-39821: CWE-1289: Improper Validation of Unsafe Equivalence in Input in golang.org/x/net golang.org/x/net/idna

0
Critical
VulnerabilityCVE-2026-39821cvecve-2026-39821cwe-1289
Published: Fri May 22 2026 (05/22/2026, 15:01:21 UTC)
Source: CVE Database V5
Vendor/Project: golang.org/x/net
Product: golang.org/x/net/idna

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

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/22/2026, 16:00:45 UTC

Technical Analysis

The golang.org/x/net/idna package's ToASCII and ToUnicode functions incorrectly handle Punycode-encoded labels that decode to ASCII-only labels. Specifically, ToUnicode("xn--example-.com") returns "example.com" instead of an error, which can cause programs relying on ASCII hostname checks to mistakenly permit access. This improper validation of equivalence in input can lead to privilege escalation in applications using this package for hostname processing.

Potential Impact

This vulnerability can lead to privilege escalation in applications that use the idna package for hostname validation and perform access control based on ASCII hostnames. An attacker could exploit this by using specially crafted Punycode labels that bypass ASCII hostname checks but are later converted to allowed Unicode hostnames, thereby gaining unauthorized access.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, developers should carefully review hostname validation logic when using the golang.org/x/net/idna package and consider additional validation steps to ensure consistent handling of Punycode and Unicode hostnames.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
Go
Date Reserved
2026-04-07T18:13:03.526Z
Cvss Version
null
State
PUBLISHED
Remediation Level
null

Threat ID: 6a1079f0e1370fbb48159db0

Added to database: 5/22/2026, 3:44:48 PM

Last enriched: 5/22/2026, 4:00:45 PM

Last updated: 5/23/2026, 7:01:06 PM

Views: 9

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses