Vulnerability · Published Dec 1, 2025 · Assigned by GitHub_M

CVE-2025-66400mdast-util-to-hast unsanitized class attribute

Medium 6.9

In plain English

A medium-severity improper input validation in mdast-util-to-hast from syntax-tree. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 26% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)6.9Medium
Exploit odds (30 days)0.3%top 74.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

mdast-util-to-hast is an mdast utility to transform to hast. From 13.0.0 to before 13.2.1, multiple (unprefixed) classnames could be added in markdown source by using character references. This could make rendered user supplied markdown code elements appear like the rest of the page. This vulnerability is fixed in 13.2.1.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmmdast-util-to-hast13.2.1GHSA-4fh9-h7wg-q85m

Affected products (as reported)

VendorProductVersions
syntax-tree mdast-util-to-hast >= 13.0.0, < 13.2.1

Weakness: CWE-20, CWE-915 · Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

References