CVE-2026-42502

Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html

Published May 22, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-1021
CPEs cpe:2.3:a:golang:net:*:*:*:*:*:go:*:*
Type Values Removed Values Added
First Time appeared Golang
Golang net
Vendors & Products Golang
Golang net
Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-79
Type Values Removed Values Added
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.
Title Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Go
Published
Updated
May 22, 2026, 5:17 PM
Reserved
Apr 28, 2026, 12:21 AM
Status
Analyzed
Published
May 22, 2026, 4:16 PM
Modified
Jul 23, 2026, 4:10 PM