{"id":"GHSA-4fh9-h7wg-q85m","summary":"mdast-util-to-hast has unsanitized class attribute","details":"### Impact\n\nMultiple (unprefixed) classnames could be added in markdown source by using character references.\nThis could make rendered user supplied markdown `code` elements appear like the rest of the page.\nThe following markdown:\n\n````markdown\n```js&#x20;xss\n```\n````\n\nWould create `\u003cpre\u003e\u003ccode class=\"language-js xss\"\u003e\u003c/code\u003e\u003c/pre\u003e`\nIf your page then applied `.xss` classes (or listeners in JS), those apply to this element.\nFor more info see \u003chttps://github.com/ChALkeR/notes/blob/master/Improper-markup-sanitization.md#unsanitized-class-attribute\u003e\n\n### Patches\n\nThe bug was patched. When using regular semver, run `npm install`. For exact ranges, make sure to use `13.2.1`.\n\n### Workarounds\n\nUpdate.\n\n### References\n\n* bug introduced in https://github.com/syntax-tree/mdast-util-to-hast/commit/6fc783ae6abdeb798fd5a68e7f3f21411dde7403\n* bug fixed in https://github.com/syntax-tree/mdast-util-to-hast/commit/ab3a79570a1afbfa7efef5d4a0cd9b5caafbc5d7","aliases":["CVE-2025-66400"],"modified":"2026-02-06T20:12:17.757825Z","published":"2025-12-02T01:25:46Z","related":["CGA-4hfg-gx73-rgq3"],"database_specific":{"severity":"MODERATE","nvd_published_at":"2025-12-01T23:15:53Z","github_reviewed":true,"cwe_ids":["CWE-20","CWE-915"],"github_reviewed_at":"2025-12-02T01:25:46Z"},"references":[{"type":"WEB","url":"https://github.com/syntax-tree/mdast-util-to-hast/security/advisories/GHSA-4fh9-h7wg-q85m"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-66400"},{"type":"WEB","url":"https://github.com/syntax-tree/mdast-util-to-hast/commit/6fc783ae6abdeb798fd5a68e7f3f21411dde7403"},{"type":"WEB","url":"https://github.com/syntax-tree/mdast-util-to-hast/commit/ab3a79570a1afbfa7efef5d4a0cd9b5caafbc5d7"},{"type":"PACKAGE","url":"https://github.com/syntax-tree/mdast-util-to-hast"}],"affected":[{"package":{"name":"mdast-util-to-hast","ecosystem":"npm","purl":"pkg:npm/mdast-util-to-hast"},"ranges":[{"type":"SEMVER","events":[{"introduced":"13.0.0"},{"fixed":"13.2.1"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-4fh9-h7wg-q85m/GHSA-4fh9-h7wg-q85m.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"},{"type":"CVSS_V4","score":"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"}]}