Skip to main content

Go net/html EUVDEUVD-2026-31451

| CVE-2026-27136 MEDIUM
Improper Restriction of Rendered UI Layers or Frames (CWE-1021)
2026-05-22 Go GHSA-m9x8-m34x-fj9q
6.1
CVSS 3.1 · Vendor: Go
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Submit crafted HTML to vulnerable Go application
  2. Delivery
    Application parses input with golang.org/x/net/html < 0.55.0
  3. Exploit
    Parser constructs unexpected DOM tree, restructuring elements
  4. Install
    Sanitizer inspects and clears the unexpected tree
  5. C2
    html.Render serializes tree back to HTML, reintroducing payload
  6. Execute
    Victim user loads rendered page
  7. Impact
    Injected script executes in victim's browser context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V3 - Web Frontend Security Clickjacking prevention, X-Frame-Options
Exploitation Conditions

Exploitation requires three specific application-level conditions to all be true simultaneously: (1) the application accepts externally supplied HTML input, (2) it uses golang.org/x/net/html (versions before 0.55.0) to parse that input as part of a sanitization workflow, and (3) it subsequently calls html.Render to re-serialize and display the sanitized parse tree to other users. Applications that display user input as escaped text, that do not re-render parsed HTML, or that use a different HTML parser are not vulnerable. The CVSS vector confirms UI:R - a victim user must load the page containing the injected content for script execution to occur, meaning mass automated exploitation is not feasible (SSVC: Automatable: no). PR:N confirms no authentication is required from the attacker's perspective to submit the malicious input, though the target application's own authentication controls may independently restrict who can submit HTML content.

Impact

CVSS 6.1 (Medium) with vector AV:N/AC:L/PR:N/UI:R/S:C reflects a network-reachable, unauthenticated attack requiring one user interaction, with changed scope - consistent with client-side XSS that executes in a victim's browser context rather than on the server. However, real-world risk is significantly conditioned by application architecture: only applications that use golang.org/x/net/html as part of a sanitize-then-render pipeline are vulnerable; applications that never re-render parsed HTML, or that use an entirely separate sanitization library, are unaffected. EPSS at 0.03% (9th percentile) indicates very low current exploitation probability, and SSVC rates exploitation as none with non-automatable impact, aligning with the user-interaction requirement. KEV status is absent. The combination of low EPSS, no KEV, and the UI:R prerequisite suggests this is not currently being opportunistically exploited at scale. The primary concern is targeted attacks against specific Go-based web applications (forums, content editors, document renderers) where untrusted HTML is accepted and re-displayed. CVSS scope change (S:C) is accurate: successful XSS breaks the browser's same-origin boundary, enabling session theft and credential harvesting beyond the vulnerable application itself.

Exploit ScenarioDerived

An attacker submits a crafted HTML payload to a Go-based web application that accepts user content (e.g., a comment field or rich-text editor). The application parses the input with golang.org/x/net/html, removes disallowed elements from the parse tree, then re-renders it to HTML for storage or display. Due to the parser's tree restructuring, the rendered output reintroduces a script element or event handler that was not present in the sanitized tree. A victim who views the resulting page executes the attacker's JavaScript in their browser, enabling session cookie theft or account takeover. No public exploit code has been identified at time of analysis, but the mutation XSS class is well-documented and proof-of-concept development requires only knowledge of Go's HTML parser edge cases.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 29, 2026

Mutation XSS in golang.org/x/net/html allows attackers to bypass HTML sanitization by exploiting divergence between the parsed and rendered HTML tree. Applications that parse untrusted HTML using this library, sanitize the resulting tree, and then re-render it are vulnerable - the rendered output can differ structurally from the sanitized intermediate representation, reintroducing attacker-controlled script execution. No public exploit has been identified at time of analysis, and CISA KEV listing is absent, but the network-accessible, no-authentication attack path with changed scope makes this relevant to any Go application handling user-supplied HTML.

RemediationAI

Upgrade golang.org/x/net/html to version 0.55.0 or later, which contains the fix applied in change list https://go.dev/cl/781685. Update your go.mod dependency and rebuild affected binaries. The fix version (0.55.0) is confirmed by the EUVD affected version range and the Go vulnerability database entry at https://pkg.go.dev/vuln/GO-2026-5030. If an immediate upgrade is not feasible, the most effective compensating control is to avoid re-rendering sanitized HTML using the same golang.org/x/net/html Render function - instead, serve the sanitized intermediate representation as escaped plain text or use a Content Security Policy (CSP) with script-src 'none' or strict nonce-based policy to neutralize injected scripts even if they survive sanitization. Note that CSP alone does not eliminate the vulnerability but significantly reduces exploitability. A strict CSP may break legitimate inline script usage in your application, so evaluate trade-offs before deploying. Alternatively, route all user-supplied HTML through a dedicated, well-maintained sanitization library rather than relying on parse-sanitize-render pipelines against this version of golang.org/x/net/html.

Affected VersionsENISA

golang.org/x/net/html 0 <0.55.0

Affected Packages

go golang.org/x/net fix: 0.55.0
euvd golang_org_x_net_html fix: 0.55.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The affected component is golang.org/x/net/html (CPE: cpe:2.3:a:golang.org/x/net:golang.org/x/net/html:*:*:*:*:*:*:*:*), the standard Go extended library for HTML5-compliant parsing and rendering. The root cause is classified as CWE-1021 (Improper Restriction of Rendered UI Layers or Frames), which in this context manifests as a mutation XSS (mXSS) pattern: the HTML parser constructs an internal tree that does not faithfully preserve the structure a sanitizer inspects. When the tree is serialized back to HTML via the Render function, the output diverges from the sanitized form, allowing injected script or event-handler content to survive the sanitization step. This is a well-known class of bug in HTML parsers - the parser's tolerance and restructuring logic (e.g., implicit element creation, foster parenting, or adoption agency algorithm quirks) creates a semantic gap between 'what was sanitized' and 'what was rendered.' The issue is tracked upstream as Go issue 79575 and patched in change list 781685.

Know when Golang Org X Net Html gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (Go) PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
SUSE MEDIUM
Red Hat 8.1 HIGH

Primary rating from Vendor (Go).

CVSS VectorVendor: Go

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
CVSS changed
May 29, 2026 - 15:37 NVD
6.1 (None) 6.1 (MEDIUM)
CVE Published
May 22, 2026 - 15:01 nvd
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.0%
Top 91% exploitable
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
openSUSE Leap 16.0 Fixed
openSUSE Tumbleweed Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise Desktop 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 12 Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy