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-42502: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in golang.org/x/net golang.org/x/net/html

0
Medium
VulnerabilityCVE-2026-42502cvecve-2026-42502cwe-79
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/html

Description

Parsing arbitrary HTML which is then rendered using Render can result in an unexpected HTML tree. This can be leveraged to execute XSS attacks in applications that attempt to sanitize input HTML before rendering.

AI-Powered Analysis

Machine-generated threat intelligence

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

Technical Analysis

The vulnerability CVE-2026-42502 in golang.org/x/net/html involves improper neutralization of input during web page generation (CWE-79). Specifically, parsing arbitrary HTML and rendering it with the Render function can produce an unexpected HTML tree. This behavior can be leveraged to bypass sanitization efforts in applications that sanitize input HTML before rendering, leading to cross-site scripting attacks. The vulnerability is published but lacks a CVSS score and no patch or official remediation guidance is currently available.

Potential Impact

Applications using golang.org/x/net/html to parse and render user-supplied HTML may be vulnerable to cross-site scripting attacks if they rely on this package for sanitization. Successful exploitation could allow attackers to execute arbitrary scripts in the context of the affected application, potentially leading to session hijacking, defacement, or other client-side impacts. No known exploits in the wild have been reported.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, developers should avoid relying solely on golang.org/x/net/html's Render function for sanitizing untrusted HTML input. Consider using alternative, well-maintained sanitization libraries or implement additional input validation and output encoding controls to mitigate XSS risks.

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-28T00:21:12.791Z
Cvss Version
null
State
PUBLISHED
Remediation Level
null

Threat ID: 6a1079f0e1370fbb48159db6

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

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

Last updated: 5/23/2026, 10:55:53 AM

Views: 5

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