Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html
Summary
| CVE | CVE-2026-42502 |
|---|---|
| State | PUBLISHED |
| Assigner | Go |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-05-22 16:16:20 UTC |
| Updated | 2026-05-29 19:09:48 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 6.1 MEDIUM from ADP
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS: 0.000310000 probability, percentile 0.094850000 (date 2026-05-30)
Problem Types: CWE-1021 | CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | ADP | DECLARED | 6.1 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 6.1 | MEDIUM | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
NoneUser Interaction
RequiredScope
ChangedConfidentiality
LowIntegrity
LowAvailability
NoneCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD Known Affected Configurations (CPE 2.3)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Golang.orgxnet | Golang.org/x/net/html | affected 0.55.0 semver | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| pkg.go.dev/vuln/GO-2026-5027 | [email protected] | pkg.go.dev | Vendor Advisory |
| go.dev/issue/79572 | [email protected] | go.dev | Issue Tracking |
| groups.google.com/g/golang-announce/c/iI-mYSI0lu8 | [email protected] | groups.google.com | Mailing List |
| go.dev/cl/781701 | [email protected] | go.dev | Issue Tracking |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Tristan Madani (en)
There are currently no legacy QID mappings associated with this CVE.