PatchSiren cyber security CVE debrief
CVE-2026-42506 golang.org/x/net CVE debrief
A cross-site scripting (XSS) vulnerability in the Go `net/html` package allows attackers to bypass HTML sanitization by exploiting unexpected HTML tree construction when parsing arbitrary HTML that is subsequently rendered. The vulnerability stems from how the parser handles certain HTML structures, producing a DOM tree that differs from what sanitizers expect, enabling injection of executable content.
- Vendor
- golang.org/x/net
- Product
- golang.org/x/net/html
- CVSS
- MEDIUM 6.1
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-05-22
- Original CVE updated
- 2026-07-23
- Advisory published
- 2026-05-22
- Advisory updated
- 2026-07-23
Who should care
Development teams using Go for web applications that accept and display HTML content; security engineers reviewing HTML sanitization pipelines; DevOps teams managing Go module dependencies.
Technical summary
The Go `golang.org/x/net/html` package constructs HTML DOM trees that may deviate from expectations when processing malformed or edge-case HTML input. If an application parses untrusted HTML, sanitizes it based on assumptions about parser behavior, then renders the result, the rendered output may contain executable scripts or other XSS payloads. The attack requires network access, user interaction with a malicious page, and affects confidentiality and integrity with low impact per the CVSS vector. Scope is changed (S:C) indicating the vulnerable component impacts resources beyond its security authority. No availability impact.
Defensive priority
medium
Recommended defensive actions
- Upgrade golang.org/x/net to version 0.55.0 or later.
- Audit applications that parse untrusted HTML and render it using `html/template` or similar rendering paths for unexpected DOM structures.
- Review HTML sanitization logic to ensure it operates on the parsed DOM rather than raw input strings, or validate output after rendering.
- Monitor golang-announce mailing list and Go security advisories for related follow-up fixes.
Evidence notes
NVD analyzed status confirmed as of 2026-05-29. CVSS 3.1 vector: AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N. CWE-79 (Improper Neutralization of Input During Web Page Generation) identified as primary weakness. Affected versions: golang:net prior to 0.55.0 for Go.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-42506 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-42506
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-42506 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-42506
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
Source reference
Unverified legacy reference
URL: https://go.dev/cl/781700
[email protected] - Issue Tracking
-
Source reference
Unverified legacy reference
URL: https://go.dev/issue/79571
[email protected] - Issue Tracking
-
Source reference
Unverified legacy reference
URL: https://groups.google.com/g/golang-announce/c/iI-mYSI0lu8
[email protected] - Mailing List
-
Mitigation or vendor reference
Unverified legacy reference
URL: https://pkg.go.dev/vuln/GO-2026-5025
[email protected] - Vendor Advisory
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.