CVE-2026-42502
6.1medium
Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html
- Severity
- 6.1medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.26% (higher than 18% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Go
- Also known as
- GO-2026-5027
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
| Product or package | Versions | Reported by |
|---|---|---|
| golang.org/x/net/html | before 0.55.0 | CVE List |
| golang.org/x/net (Go) | before 0.55.0 | Go Vulnerability Database |
| golang net | before 0.55.0 | NVD |
Classification
What each source says
CVE List
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.
NVD (es)
Procesar HTML arbitrario que luego se renderiza usando Render puede resultar en un árbol HTML inesperado. Esto puede ser explotado para ejecutar ataques XSS en aplicaciones que intentan sanear el HTML de entrada antes de renderizar.
References
| https://go.dev/issue/79572 | issue-tracking, report | |
| https://groups.google.com/g/golang-announce/c/iI-mYSI0lu8 | mailing-list, web | |
| https://go.dev/cl/781701 | fix, issue-tracking | |
| https://pkg.go.dev/vuln/GO-2026-5027 | vendor-advisory | |
Related
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42502 changed 2026-05-22 | CVE Terms of Use |
| Go Vulnerability Database | GO-2026-5027 changed 2026-11-23 | CC-BY-4.0 |
| NVD | CVE-2026-42502 changed 2026-07-23 | Public domain |