XSS in Golang.org/x/net Golang.org/x/net/html

CVE-2025-22872

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 class: XSS (Cross-Site Scripting)

EPSS: 0.005 (40.7th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 6.5 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L.

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2025-22872?
CVE-2025-22872 is a medium-severity vulnerability in Golang.org/x/net Golang.org/x/net/html, classified under Cross-site Scripting. CVSS score: 6.5/10. Published 2025-04-16.
How severe is CVE-2025-22872?
Medium severity. CVSS v3 base score is 6.5 out of 10.
Is CVE-2025-22872 known to be exploited?
6 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.