{"id":"GHSA-4fh9-h7wg-q85m","revision":"7531a214efe84b6b85ff8864e58d8cb1","records":[{"revision":"7531a214efe84b6b85ff8864e58d8cb1","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-4fh9-h7wg-q85m","aliases":["CVE-2025-66400"],"title":"mdast-util-to-hast has unsanitized class attribute","description":"### 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 `<pre><code class=\"language-js xss\"></code></pre>`\nIf your page then applied `.xss` classes (or listeners in JS), those apply to this element.\nFor more info see <https://github.com/ChALkeR/notes/blob/master/Improper-markup-sanitization.md#unsanitized-class-attribute>\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","state":0,"publishedAt":"2025-12-02T01:25:46+00:00","modifiedAt":"2026-09-10T03:50:31.2881543+00:00","affected":[{"ecosystem":"npm","name":"mdast-util-to-hast","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"13.0.0"},{"kind":"fixed","version":"13.2.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","score":null,"severity":null},{"system":"CVSS_V4","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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/syntax-tree/mdast-util-to-hast/security/advisories/GHSA-4fh9-h7wg-q85m","https://nvd.nist.gov/vuln/detail/CVE-2025-66400","https://github.com/syntax-tree/mdast-util-to-hast/commit/6fc783ae6abdeb798fd5a68e7f3f21411dde7403","https://github.com/syntax-tree/mdast-util-to-hast/commit/ab3a79570a1afbfa7efef5d4a0cd9b5caafbc5d7","https://github.com/syntax-tree/mdast-util-to-hast"],"sourceUrl":"https://github.com/advisories/GHSA-4fh9-h7wg-q85m","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4fh9-h7wg-q85m","identifiers":["GHSA-4fh9-h7wg-q85m","CVE-2025-66400"]},"retained":false,"historicalAffected":[]}],"coverage":[]}