What’s Vulnerable › Vulnerabilities
CVE-2026-42506: Invoking incorrect handling of namespaced elements in foreign content in golang.org/x/net/html
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-05-22 · updated 2026-07-23
- Weakness: CWE-79
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.
Affected products
- golang.org/x/net/html: before 0.55.0 — fixed in 0.55.0
- Golang.Org/X/Net: before 0.55.0 — fixed in 0.55.0
How to fix
Upgrade to a fixed version: golang.org/x/net/html 0.55.0; Golang.Org/X/Net 0.55.0. Check the vendor advisory for mitigations.
References
- https://go.dev/cl/781700
- https://go.dev/issue/79571
- https://groups.google.com/g/golang-announce/c/iI-mYSI0lu8
- https://pkg.go.dev/vuln/GO-2026-5025
Get alerted when CVE-2026-42506 or the next vulnerability affects your stack