Skip to main content

Go x/net/html EUVDEUVD-2026-31452

| CVE-2026-25681 MEDIUM
Improper Restriction of Rendered UI Layers or Frames (CWE-1021)
2026-05-22 Go GHSA-w9p8-pvxh-rxpj
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 application input
  2. Delivery
    Application parses HTML with vulnerable golang.org/x/net/html
  3. Exploit
    Sanitizer walks parse tree and finds no violations
  4. Install
    Render serializes tree to HTML string
  5. C2
    Victim loads page; browser re-parses serialized HTML differently
  6. Execute
    Browser executes injected script payload
  7. Impact
    Attacker achieves XSS (session theft, DOM manipulation)

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 that the target application uses golang.org/x/net/html's Render function as part of a sanitization pipeline - specifically, the application must parse attacker-controlled HTML with this library, walk the resulting tree to remove disallowed elements or attributes, serialize the tree back to HTML using Render, and then deliver that serialized output to a browser for rendering. If the application does not re-serialize and re-render the parsed tree (e.g., it only processes the tree server-side or discards the rendered output), it is not vulnerable. User interaction is required (UI:R in CVSS), consistent with a victim needing to view the rendered page containing the attacker's payload. The attack is unauthenticated (PR:N) from the attacker's perspective, meaning no account or session on the target application is needed to submit the malicious input, but exploiting the XSS impact requires a victim user to load the page. The vulnerability does not affect applications that use this package purely for parsing without rendering, nor applications that do not accept HTML from untrusted sources.

Impact

The CVSS 6.1 (Medium) score reflects a network-exploitable, low-complexity, no-privilege-required attack that requires user interaction and has a Changed scope - consistent with a reflected or stored XSS chain. EPSS is notably low at 0.03% (9th percentile), and SSVC classifies exploitation as 'none' with automatable 'no' and technical impact 'partial', suggesting no observed mass exploitation and meaningful friction to weaponization. These signals are broadly consistent: mXSS attacks require a specific application architecture (parse → sanitize → re-render pipeline using this exact library), so the vulnerable population is narrower than a generic web XSS. However, the real-world risk to applications that ARE in this pattern is non-trivial - mXSS defeats the entire purpose of a sanitization layer and can lead to full client-side compromise, session hijacking, or credential theft. The low EPSS likely reflects the specificity of required conditions, not that the vulnerability is unimportant. No conflicting signals identified; CVSS vector is consistent with the description.

Exploit ScenarioDerived

An attacker submits crafted HTML to a Go web application - for example, a comment field or rich-text editor - that uses golang.org/x/net/html to sanitize user input before storing and rendering it. The parser constructs an unexpected tree that survives the sanitizer's allowlist check, and when the sanitized output is rendered by the victim's browser, the browser re-parses the HTML differently and executes the embedded script payload. No public exploit code is identified at time of analysis, but the mXSS attack class is well-documented and straightforward to exploit once a triggering input is identified.

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

Parser-differential XSS in golang.org/x/net/html allows sanitization bypass when applications parse-sanitize-reserialize HTML before rendering. The Go HTML parser produces an unexpected tree structure for certain crafted inputs, meaning a sanitizer that walks the first-pass parse tree and deems content safe may produce output that, when re-parsed by a browser or downstream renderer, yields a structurally different - and dangerous - DOM. Affected are all applications using golang.org/x/net/html versions prior to 0.55.0 that rely on this library as part of an HTML sanitization pipeline; no confirmed active exploitation (CISA KEV) and EPSS is 0.03%, but the attack class (mutation XSS) is well-understood and high-value for targeted web application attacks.

RemediationAI

The primary fix is to upgrade golang.org/x/net/html to version 0.55.0 or later, which contains the patch per the Go vulnerability database (GO-2026-5029) and the upstream code change at https://go.dev/cl/781703. Run 'go get golang.org/x/net@v0.55.0' and rebuild. As a compensating control where immediate upgrade is not possible, applications should avoid using golang.org/x/net/html's Render output as trusted HTML for re-injection into a browser context - instead, treat any re-serialized output as untrusted and apply a secondary, browser-side Content Security Policy (CSP) with a strict script-src directive to limit XSS impact. Note that CSP is a defense-in-depth measure, not a substitute for patching, and nonce-based CSP may be bypassed if the application itself injects attacker-controlled content. The vendor advisory and patch details are at https://pkg.go.dev/vuln/GO-2026-5029.

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 Go extended standard library's HTML5 parsing package, maintained by the Go team. The root cause is classified as CWE-1021 (Improper Restriction of Rendered UI Layers or Frames), which here manifests as a parser-differential or mutation XSS (mXSS) condition: the library's Render function reconstructs an HTML string from a parsed tree, but under certain inputs the resulting serialization, when re-parsed - as a browser will do - produces a different DOM tree than was originally sanitized. This is a well-documented class of vulnerability in HTML sanitizers: if the sanitizer's parser and the browser's parser disagree on how to construct a tree from the same markup, a sanitizer can pass content it believes is clean, only for the renderer to interpret it as executable script. The issue is tracked upstream at go.dev/issue/79574 and the fix is in CL 781703.

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

References

Advisories & patches
ADVISORY https://access.redhat.com/errata/RHSA-2026:34342 ADVISORY https://access.redhat.com/errata/RHSA-2026:34357 ADVISORY https://access.redhat.com/errata/RHSA-2026:34359 ADVISORY https://access.redhat.com/errata/RHSA-2026:34364 ADVISORY https://access.redhat.com/errata/RHSA-2026:35827 ADVISORY https://access.redhat.com/errata/RHSA-2026:35828 ADVISORY https://access.redhat.com/errata/RHSA-2026:36207 ADVISORY https://access.redhat.com/errata/RHSA-2026:36319 ADVISORY https://access.redhat.com/errata/RHSA-2026:36625 ADVISORY https://access.redhat.com/errata/RHSA-2026:36882 ADVISORY https://access.redhat.com/errata/RHSA-2026:37072 ADVISORY https://access.redhat.com/errata/RHSA-2026:37123 ADVISORY https://access.redhat.com/errata/RHSA-2026:37387 ADVISORY https://access.redhat.com/errata/RHSA-2026:41030 ADVISORY https://access.redhat.com/errata/RHSA-2026:41036 ADVISORY https://access.redhat.com/errata/RHSA-2026:41928 ADVISORY https://access.redhat.com/errata/RHSA-2026:42078 ADVISORY https://access.redhat.com/errata/RHSA-2026:42079 ADVISORY https://access.redhat.com/errata/RHSA-2026:42132 ADVISORY https://access.redhat.com/errata/RHSA-2026:42644 ADVISORY https://access.redhat.com/errata/RHSA-2026:42852 ADVISORY https://access.redhat.com/errata/RHSA-2026:43038 ADVISORY https://access.redhat.com/errata/RHSA-2026:43692 ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-25681 ADVISORY https://vuldb.com/vuln/365213 REF https://go.dev/cl/781703 REF https://go.dev/issue/79574 REF https://groups.google.com/g/golang-announce/c/iI-mYSI0lu8 REF https://pkg.go.dev/vuln/GO-2026-5029

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