Golang HTML Parser XSS Vulnerability via DOCTYPE Character Reference Mismanagement

Vulnerability

A cross-site scripting (XSS) vulnerability has been identified in the HTML parser of the Golang x/net/html package, prior to version 0.55.0. The issue arises from the parser's incorrect handling of character references in DOCTYPE nodes, leading to a distorted HTML tree. This flaw can be exploited in applications that sanitize HTML input before rendering, allowing for XSS attacks.

Impact

Exploitation of this vulnerability can lead to cross-site scripting (XSS) attacks, where an attacker can inject malicious scripts that are executed in the context of the user's browser.

Remediation

Users can upgrade to Golang x/net version 0.55.0 or later to address this vulnerability.

Added: May 26, 2026, 3:55 PM
Updated: May 26, 2026, 3:55 PM

Vulnerability Rating

Custom Algorithm
spread
5.4
impact
1.7
exploitability
5.1
remediation
7.7
relevance
9.1
threat
3.2
urgency
2.9
incentive
0.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.