CVE-2026-42506: Invoking incorrect handling of namespaced elements in foreign content in golang.org/x/net/html
Invoking incorrect handling of namespaced elements in foreign content in golang.org/x/net/html
Other sources
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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.8.1-4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.4.0-6 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.7.0-6 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.30.10-25 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.12.0-6 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.9.5-14 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.7.1-5 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.32.0-6 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.0.10-6 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.7.5-17 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.62.0-5 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.12.15-8 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.14.1-13 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.62.0-16 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 4.0.2-8 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.31.0-21 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 1.7.7-4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.14.0-13 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.27.0-11 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 0.5.1-4 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.1.6-3 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.7.11-6
Event History
Frequently Asked Questions
What is the severity of CVE-2026-42506?
CVE-2026-42506 has a risk score of 52, indicating a moderate vulnerability.
What should I do to fix CVE-2026-42506?
To address CVE-2026-42506, ensure that your HTML parsing and rendering logic correctly handles namespaced elements.
What types of attacks can be executed due to CVE-2026-42506?
CVE-2026-42506 can be exploited to execute cross-site scripting (XSS) attacks.
What software is affected by CVE-2026-42506?
CVE-2026-42506 affects the golang.org/x/net/html package in the Go programming language.
When was CVE-2026-42506 published?
CVE-2026-42506 was published on May 22, 2026.