CVE Catalog

CVE-2025-22872

MediumCVSS 6.5
Published: Updated: Translated: NVD NIST

Summary

The tokenizer incorrectly interprets tags with unquoted attribute values ending with a solidus character (/) as self-closing. When directly using Tokenizer, this can incorrectly mark such tags as self-closing, and when using Parse functions, content following such tags may be placed in the wrong scope during DOM construction, but only when tags are in foreign content (e.g., <math>, <svg> contexts).

Risk Assessment

Incorrect tag interpretation can lead to improper DOM construction, potentially enabling cross-site scripting (XSS) attacks or content manipulation in applications processing untrusted HTML. This particularly affects embedded content contexts such as MathML and SVG.

Recommendation

Update the library to a version containing the fix. Avoid processing untrusted HTML with vulnerable versions; consider additional input sanitization.

Other vulnerabilities in golang.org/x/net/html

See all
Original NVD description (English source)

The tokenizer incorrectly interprets tags with unquoted attribute values that end with a solidus character (/) as self-closing. When directly using Tokenizer, this can result in such tags incorrectly being marked as self-closing, and when using the Parse functions, this can result in content following such tags as being placed in the wrong scope during DOM construction, but only when tags are in foreign content (e.g. <math>, <svg>, etc contexts).

Vulnerability data from NVD (NIST) · CISA KEV · EPSS