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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | mdast-util-to-hast | 13.2.1 | GHSA-4fh9-h7wg-q85m |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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
- https://github.com/syntax-tree/mdast-util-to-hast/security/advisories/GHSA-4fh9-h7wg-q85m x_refsource_CONFIRM
- https://github.com/syntax-tree/mdast-util-to-hast/commit/6fc783ae6abdeb798fd5a68e7f3f21411dde7403 x_refsource_MISC
- https://github.com/syntax-tree/mdast-util-to-hast/commit/ab3a79570a1afbfa7efef5d4a0cd9b5caafbc5d7 x_refsource_MISC