Skip to main content

CVE-2025-22872 — Vulnerability in golang.org/x/net — CVE Details

MEDIUM

golang.org/x/net vulnerable to Cross-site Scripting

Published April 16, 2025Updated September 10, 2026Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.61%). Schedule for your next planned update.

Does your project use an affected golang.org/x/net version?

Paste your go.sum to check it for CVE-2025-22872 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

Summary

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. , , etc contexts).

Advisory Timeline

  • First published April 16, 2025 (589 days ago).
  • Last revised September 10, 2026 — 511 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update golang.org/x/net to 0.38.0 or later
go get golang.org/x/net@v0.38.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: Go (1).

PackageFixed In
golang.org/x/net Go · Affected: All versions0.38.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
P
Scope
—
Confidentiality
—
Integrity
—
Availability
—

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Frequently Asked Questions

What is CVE-2025-22872?
golang.org/x/net vulnerable to Cross-site Scripting. This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.1/10).
How do I check if my project is affected by CVE-2025-22872?
CVE-2025-22872 affects golang.org/x/net. It has a 0.6% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-22872 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.1

Exploitation requires specific conditions, or the impact is limited.

EPSS Score (30-day exploit probability)
0.61%
EPSS percentile: 43.2

This is a below-median EPSS score — only 43.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-vvgc-356p-c3xw
GO-2025-3595

Related CVEs

  • CVE-2025-58190

    Infinite parsing loop in golang.org/x/net

  • CVE-2026-33814

    Infinite loop in HTTP/2 transport when given bad SETTINGS_MAX_FRAME_SIZE in net/http/internal/http2 in golang.org/x/net

  • CVE-2026-42506

    Invoking incorrect handling of namespaced elements in foreign content in golang.org/x/net/html

  • CVE-2026-39821

    Invoking failure to reject ASCII-only Punycode-encoded labels in golang.org/x/net/idna

  • CVE-2026-42502

    Invoking incorrect handling of HTML elements in foreign content in golang.org/x/net/html

  • CVE-2026-25680

    Invoking denial of service when parsing arbitrary HTML in golang.org/x/net/html

  • CVE-2026-25681

    Invoking incorrect handling of character references in DOCTYPE nodes in golang.org/x/net/html

  • CVE-2026-27136

    Invoking duplicate attributes can cause XSS in golang.org/x/net/html

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum