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

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.33%, higher than 27% of CVEs (2026-12-01)
- Published: 2025-12-01T22:17:42.705Z
- Modified: 2026-10-18T18:10:00.100Z
- Also known as: GHSA-4fh9-h7wg-q85m
- Weaknesses: CWE-20, CWE-915
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- syntax-tree mdast-util-to-hast: >= 13.0.0, < 13.2.1
- mdast-util-to-hast (npm): from 13.0.0 before 13.2.1
- unifiedjs mdast-util-to-hast: from 13.0.0 before 13.2.1

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `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`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:4.0 Medium `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: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://github.com/syntax-tree/mdast-util-to-hast/security/advisories/GHSA-4fh9-h7wg-q85m> (vendor-advisory, web)
- <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://nvd.nist.gov/vuln/detail/CVE-2025-66400> (advisory)
- <https://github.com/syntax-tree/mdast-util-to-hast> (package)

## Sources

- CVE List: [CVE-2025-66400](https://www.cve.org/CVERecord?id=CVE-2025-66400), CVE Terms of Use, modified 2025-12-02
- GitHub Advisory Database: [GHSA-4fh9-h7wg-q85m](https://github.com/advisories/GHSA-4fh9-h7wg-q85m), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-66400](https://nvd.nist.gov/vuln/detail/CVE-2025-66400), Public domain, modified 2026-10-18

---

Page: https://cve.day/CVE-2025-66400 · Whole record: https://cve.day/CVE-2025-66400.json · Rebuilt by cve.day 2026-11-25T22:59:08.150Z
