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)

Published · last modified .

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.

EPSS exploit prediction

EPSS: 0.005 (42.9th percentile), scored .

Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 43rd percentile — 42.9% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2025-22872: held from 0.005 to 0.005.

EPSS over last 30 days · oldest: 0.005 · newest: 0.005 · change: +0.000

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.