Technical impact
Astro’s Prism syntax‑highlighter component returned code unchanged when Prism had no grammar for a requested language. Callers inserted that unchanged output as raw HTML, allowing code blocks labeled with unsupported or attacker‑controlled languages to embed arbitrary HTML and script, which can execute in the viewer’s browser. The flaw is a classic cross‑site scripting vulnerability that can compromise the confidentiality, integrity, and availability of the rendered page for any user who views the affected content.
Affected Systems
The vulnerability affects the Astro web framework and its extensions @astrojs/prism and @astrojs/markdoc. Versions of @astrojs/prism prior to 4.1.2 and @astrojs/markdoc from 0.3.0 through 2.1.2 are vulnerable. The issue is present when user or untrusted content includes code blocks with an unsupported language tag, leading to injection of arbitrary HTML or scripts.
Risk and Exploitability
The CVSS score of 5.4 indicates moderate severity, and the EPSS score of less than 1% suggests a low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. Attackers can exploit it via content submission or authoring features that allow untrusted code to be processed by Prism or the Markdoc prism extension. Once successful, the attacker can execute arbitrary scripts in the context of the page, potentially stealing user data or defacing the site.