CVE-2025-66400
MEDIUM 6.9CVSS 4.0mdast-util-to-hast has unsanitized class attribute
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.
- Published
- 1 Dec 2025
- Last modified
- 18 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-20CWE-915
- Also known as
- GHSA-4fh9-h7wg-q85m
- Sources
- NVDJSONOSV GHSA-4fh9-h7wg-q85mJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 6.9 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | unifiedjs | mdast-util-to-hastcpe:2.3:a:unifiedjs:mdast-util-to-hast:*:*:*:*:*:node.js:*:* |
>= 13.0.0, < 13.2.1 | 13.2.1 |
| OSV | npm | mdast-util-to-hast | >= 13.0.0, < 13.2.1 | 13.2.1 |
References
- https://github.com/syntax-tree/mdast-util-to-hast/commit/6fc783ae6abdeb798fd5a68e7f3f21411dde7403 · Patch, WEB
- https://github.com/syntax-tree/mdast-util-to-hast/commit/ab3a79570a1afbfa7efef5d4a0cd9b5caafbc5d7 · Patch, WEB
- https://github.com/syntax-tree/mdast-util-to-hast/security/advisories/GHSA-4fh9-h7wg-q85m · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2025-66400 · ADVISORY
- https://github.com/syntax-tree/mdast-util-to-hast · PACKAGE
History
- 25 Nov 2026 20:59 UTC · NVD: first stored (published 1 Dec 2025)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 2 Dec 2025)