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-05-29
- Advisory published
- 2026-05-22
- Advisory updated
- 2026-05-29
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.
Official resources
-
CVE-2026-42506 CVE record
CVE.org
-
CVE-2026-42506 NVD detail
NVD
-
Source item URL
nvd_modified
-
Source reference
[email protected] - Issue Tracking
-
Source reference
[email protected] - Issue Tracking
-
Source reference
[email protected] - Mailing List
-
Mitigation or vendor reference
[email protected] - Vendor Advisory
2026-05-22T16:16:20.803Z