Vulnerability · Published Apr 16, 2025 · Assigned by Go

CVE-2025-22872Incorrect Neutralization of Input During Web Page Generation in x/net in golang.org/x/net

Medium 6.5

In plain English

A medium-severity security flaw in golang.org/x/net/html from golang.org/x/net. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 46% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)0.5%top 54.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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).

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12golang-golang-x-netno fix listedDEBIAN-CVE-2025-22872
Debian:13golang-golang-x-net1:0.27.0-2DEBIAN-CVE-2025-22872
Debian:14golang-golang-x-net1:0.27.0-2DEBIAN-CVE-2025-22872
Gogolang.org/x/net0.38.0GHSA-vvgc-356p-c3xw
Gogolang.org/x/net0.38.0GO-2025-3595
Ubuntu:22.04:LTSgolang-golang-x-net1:0.0+git20211209.491a49a+dfsg-1ubuntu0.1USN-8900-1
Ubuntu:22.04:LTSgolang-golang-x-net1:0.0+git20211209.491a49a+dfsg-1ubuntu0.1UBUNTU-CVE-2025-22872

Affected products (as reported)

VendorProductVersions
golang.org/x/net golang.org/x/net/html 0 – before 0.38.0

References