Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthorized author submits code fence with unsupported lang
-
ExploitEmbedded HTML/script stored unescaped as raw HTML
-
ExecutionVisitor loads rendered page
-
ImpactScript executes in site origin (stored XSS)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the application to use Prism for highlighting (not the default Shiki). Two concrete paths: (1) the @astrojs/markdoc prism() extension is enabled and the site accepts content from less-trusted authors (CMS editors, outside contributors) who cannot otherwise inject HTML - they place HTML/JavaScript inside a fenced code block tagged with a Prism-unsupported language such as vue, svelte, mdx, console, or text; (2) the <Prism /> component is passed untrusted code together with an unsupported or attacker-controlled lang value. Limiting factors: the attacker must be an authorized content author or control the component's input (PR:L), a visitor must view the affected page (UI:R), and sites using supported languages, no-language/plaintext blocks, or Shiki are not affected. Markdown/MDX via syntaxHighlight:'prism' already permit raw HTML, so the flaw adds no new capability there. |
| Impact | This is a medium-severity stored XSS (CWE-79) with CVSS 5.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N). The network vector and low complexity are offset by two real constraints baked into the vector: PR:L means the attacker must be an authenticated/authorized content contributor (a Markdoc content author or an application passing attacker-influenced input to the <Prism /> component), and UI:R means a victim must load the rendered page. Scope is changed (S:C) and impact is partial confidentiality and integrity (C:L/I:L, A:N), consistent with script execution in the site origin against visitors rather than full server compromise. No EPSS score, KEV listing, or PoC/exploit flag is present in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation; the vuln.today decision label is 'this_month' (not act_now/emergency). The practical risk is further reduced because the vulnerable path only exists when applications opt into Prism highlighting - Shiki is the default for both Markdown and Markdoc. Net: a legitimate, patch-worthy issue for sites using Prism with less-trusted content authors, but not a drop-everything emergency; it is a genuine moderate-priority bug rather than an inflated high-CVSS item. |
| Exploit ScenarioDerived | On an Astro site using the @astrojs/markdoc prism() extension, a CMS editor or outside contributor who is not permitted to write raw HTML inserts a fenced code block labeled with a language Prism does not support (e.g. vue, svelte, console, text) containing an HTML <script> payload. Because runHighlighterWithAstro() returned the code unescaped for unsupported languages and callers injected it as raw HTML, the payload is stored and then executes in every visitor's browser on the site's origin. No public exploit tool is identified, but the GHSA advisory documents the exact trigger and payload shape. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 12, 2026
Stored cross-site scripting in the Astro ecosystem affects @astrojs/prism before 4.1.2 and the @astrojs/markdoc prism() extension from 0.3.0 through 2.1.1: code blocks tagged with a language Prism has no grammar for are emitted into the page as raw HTML instead of escaped text, so embedded markup and script execute in the site's origin for every visitor. Exploitation requires an authenticated low-privileged actor - a content author on a Markdoc site using the prism() extension whose ordinary HTML rendering is otherwise disabled, or an application passing untrusted code plus an attacker-influenced lang into the <Prism /> component - plus a victim viewing the rendered page (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N, 5.4). Sites using the default Shiki highlighter, supported languages, or plaintext/no-language blocks are unaffected; no public exploit has been identified at time of analysis.
RemediationAI
Upgrade to @astrojs/prism 4.1.2 and @astrojs/markdoc 2.1.2, which escape code when no Prism grammar exists and escape the language in generated class and data-language attributes; EUVD additionally records Astro below 7.4.3 as affected, so bring the astro package to 7.4.3 or later. Consult GHSA-ff38-p3qj-4pmf (https://github.com/withastro/astro/security/advisories/GHSA-ff38-p3qj-4pmf) and the release tags https://github.com/withastro/astro/releases/tag/@astrojs/prism@4.1.2 and https://github.com/withastro/astro/releases/tag/@astrojs/markdoc@2.1.2 for the exact upgrade path. Where upgrading is not immediately possible, the vendor-listed workarounds are to switch highlighting to Shiki - the default for Markdown, and the shiki() extension for Markdoc - which removes the vulnerable Prism fallback at the cost of different highlighting output; to restrict the <Prism /> component to languages Prism actually supports, or HTML-escape untrusted code before passing it into the code prop, which shifts the escaping burden onto the caller; and, for Markdoc content from less-trusted authors, to stop using the prism() extension until a patched version is deployed, which disables Prism-based highlighting for those code fences. No vendor-released patch was identified for any version outside the fixed releases listed above.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw class is CWE-79 and lives in the syntax-highlighting pipeline shared by Astro's Prism integration and its Markdown/Markdoc remark and satteri processors. In packages/astro-prism/src/highlighter.ts, runHighlighterWithAstro() initialized let html = code and only replaced it with Prism.highlight(code, grammar, lang) when Prism.languages[lang] resolved to a grammar; with no grammar it returned the original code untouched. Every consumer then inserted that string as raw HTML - the <Prism /> component through set:html, and the markdoc prism() extension for every fenced code block - so an unsupported language label such as vue, svelte, mdx, console or text turned the fence into a live markup sink rather than a text display. The upstream commit edfbf4ab34ff007ae8f7188af76a023a15c9443d replaces the fallback with an escapeCode() routine that entity-encodes &, < and >, and additionally adds escapeAttribute() handling in the markdoc extension and in the remark/satteri processors so the language token itself cannot break out of the generated class and data-language attributes. Affected package identities from the CPE data are withastro:astro, @astrojs:prism and @astrojs:markdoc. Markdown and MDX rendered with markdown.syntaxHighlight: 'prism' traverse the same fallback but add no new capability, because those formats already permit raw HTML.
Know when Astro gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Stored XSS requiring an authorized content author or attacker-controlled component input (PR:L) and a victim page view (UI:R); script runs in the site origin (S:C, C:L/I:L, no availability impact).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Astro is a web framework for content-driven websites. Prior to @astrojs/prism 4.1.2, and from @astrojs/markdoc 0.3.0 until 2.1.2, runHighlighterWithAstro() returned code unchanged when Prism had no grammar for the requested language, and callers inserted that result as raw HTML. A code block labeled with an unsupported language could therefore render embedded HTML and script instead of displaying it as text. The Prism component was affected when applications supplied untrusted code with an unsupported or attacker-controlled lang, and the @astrojs/markdoc prism() extension was affected for less-trusted content authors even when Markdoc's ordinary HTML rendering was disabled. This issue is fixed in @astrojs/prism 4.1.2 and @astrojs/markdoc 2.1.2.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
SQL Injection exists in the Saxum Astro 4.0.14 component for Joomla!. Rated critical severity (CVSS 9.8), this vulnerabi
Astro web framework versions prior to 9.5.4 contain a server-side request forgery vulnerability in error page handling t
Authorization bypass in the Astro web framework version 6.4.7 lets remote unauthenticated attackers reach protected rout
Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.8), this vulnerability is remotely exp
Server-side request forgery in Astro's built-in image proxy lets unauthenticated remote attackers force the server to fe
Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.2), this vulnerability is remotely exp
Astro is a web framework for content-driven websites. Rated medium severity (CVSS 6.9), this vulnerability is remotely e
Astro is a web framework. Rated medium severity (CVSS 6.9), this vulnerability is remotely exploitable, no authenticatio
Astro is a web framework. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploitable, no authenticatio
Unvalidated reflection of the X-Forwarded-Host header in Astro (versions before 5.14.3) lets remote, unauthenticated att
Astro web framework versions 9.0.0 through 9.5.3 fail to validate remote image domains when the inferSize option is enab
Base-path prefix bypass in Astro prior to 7.2.4 allows unauthenticated remote attackers to reach protected server-side r
EUVD-2026-124749
NVD
CVE.org
EPSS
GitHub
Exploit-DB