CVE-2025-66400: syntax-tree mdast-util-to-hast · Improper Input Validation
Affects syntax-tree mdast-util-to-hastSource CVE Database V5
Not known to be exploited · CVSS 6.9 Medium : upgrade to 13.2.1 when convenient.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 23% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 13.2.1
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 1 Dec 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Upgrade syntax-tree mdast-util-to-hast to 13.2.1.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
npmmdast-util-to-hastpkg:npm/mdast-util-to-hastOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should immediately upgrade all instances of mdast-util-to-hast to version 13.2.1 or later, where the vulnerability is fixed. For environments where immediate upgrade is not feasible, implement input sanitization and validation layers upstream to detect and neutralize character references that could inject unprefixed classnames. Employ Content Security Policy (CSP) headers to restrict the application of unauthorized CSS classes or styles, limiting the impact of injected classnames. Conduct thorough code reviews and security testing on markdown rendering pipelines to identify and remediate similar input validation weaknesses. Monitor markdown content submissions for anomalous patterns indicative of exploitation attempts. Additionally, educate developers and content managers about the risks of rendering untrusted markdown and encourage the use of secure libraries and frameworks. Maintain up-to-date dependency management practices and subscribe to vulnerability advisories related to syntax-tree and markdown processing tools.
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.
References
- github.com/syntax-tree/mdast-util-to-hast/security/advisories/GHSA-4fh9-h7wg-q85m (opens in a new tab)
- github.com/syntax-tree/mdast-util-to-hast/commit/6fc783ae6abdeb798fd5a68e7f3f21411dde7403 (opens in a new tab)
- github.com/syntax-tree/mdast-util-to-hast/commit/ab3a79570a1afbfa7efef5d4a0cd9b5caafbc5d7 (opens in a new tab)