Mdast Util To Hast
Monthly
Renderer-side class injection in the mdast-util-to-hast npm package (13.0.0 up to but not including 13.2.1) lets attacker-supplied markdown smuggle extra, unprefixed class names onto generated HTML `<code>` elements, so an untrusted fenced code block can be made to look or behave like trusted page chrome. The fenced-code language identifier is read after HTML character references in the markdown source have been decoded, so a payload such as ```js xss renders as `<code class="language-js xss">`; the injected class only matters where the host page already defines CSS rules or JavaScript listeners bound to that name, which sharply limits real-world impact. Unauthenticated remote abuse is possible wherever untrusted markdown is rendered (CVSS 4.0 base 6.9, assessed CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/I:L), but no public exploit code or active exploitation has been identified at time of analysis and EPSS sits at roughly 0.08% (23rd percentile), consistent with a low-priority integrity-only issue rather than a high-severity one.
Renderer-side class injection in the mdast-util-to-hast npm package (13.0.0 up to but not including 13.2.1) lets attacker-supplied markdown smuggle extra, unprefixed class names onto generated HTML `<code>` elements, so an untrusted fenced code block can be made to look or behave like trusted page chrome. The fenced-code language identifier is read after HTML character references in the markdown source have been decoded, so a payload such as ```js xss renders as `<code class="language-js xss">`; the injected class only matters where the host page already defines CSS rules or JavaScript listeners bound to that name, which sharply limits real-world impact. Unauthenticated remote abuse is possible wherever untrusted markdown is rendered (CVSS 4.0 base 6.9, assessed CVSS 3.1 AV:N/AC:L/PR:N/UI:N/S:U/I:L), but no public exploit code or active exploitation has been identified at time of analysis and EPSS sits at roughly 0.08% (23rd percentile), consistent with a low-priority integrity-only issue rather than a high-severity one.