Skip to main content

@astrojs/prism EUVDEUVD-2026-124749

| CVE-2026-126365 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-11-12 GitHub_M
5.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authorized author submits code fence with unsupported lang
  2. Exploit
    Embedded HTML/script stored unescaped as raw HTML
  3. Execution
    Visitor loads rendered page
  4. Impact
    Script 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

astro < 7.4.3
markdoc 0.3.0, < 2.1.2
prism < 4.1.2

Affected Packages

euvd astro fix: 7.4.3
euvd markdoc fix: 2.1.2
euvd prism fix: 4.1.2

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

Vendor (GitHub_M) PRIMARY 5.4 MEDIUM
AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 5.4 MEDIUM

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).

3.1 AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N
Red Hat 5.4 MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

1
Patch available
Nov 12, 2026 - 23:03 EUVD

DescriptionCVE.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

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
Astro is popular, but the vulnerable Prism/Markdoc integrations are opt-in; Shiki is the default
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

27
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +27
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Astro

View all
CVE-2018-7180 CRITICAL POC
9.8 Feb 17

SQL Injection exists in the Saxum Astro 4.0.14 component for Joomla!. Rated critical severity (CVSS 9.8), this vulnerabi

CVE-2026-25545 HIGH POC
8.6 Feb 24

Astro web framework versions prior to 9.5.4 contain a server-side request forgery vulnerability in error page handling t

CVE-2026-59731 HIGH POC
8.2 Jul 08

Authorization bypass in the Astro web framework version 6.4.7 lets remote unauthenticated attackers reach protected rout

CVE-2024-56159 HIGH POC
7.8 Dec 19

Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.8), this vulnerability is remotely exp

CVE-2025-59837 HIGH POC
7.2 Oct 28

Server-side request forgery in Astro's built-in image proxy lets unauthenticated remote attackers force the server to fe

CVE-2025-58179 HIGH POC
7.2 Sep 05

Astro is a web framework for content-driven websites. Rated high severity (CVSS 7.2), this vulnerability is remotely exp

CVE-2025-55303 MEDIUM POC
6.9 Aug 19

Astro is a web framework for content-driven websites. Rated medium severity (CVSS 6.9), this vulnerability is remotely e

CVE-2025-64765 MEDIUM POC
6.9 Nov 19

Astro is a web framework. Rated medium severity (CVSS 6.9), this vulnerability is remotely exploitable, no authenticatio

CVE-2025-64525 MEDIUM POC
6.5 Nov 13

Astro is a web framework. Rated medium severity (CVSS 6.5), this vulnerability is remotely exploitable, no authenticatio

CVE-2025-61925 MEDIUM POC
6.5 Oct 10

Unvalidated reflection of the X-Forwarded-Host header in Astro (versions before 5.14.3) lets remote, unauthenticated att

CVE-2026-27829 MEDIUM POC
6.5 Feb 26

Astro web framework versions 9.0.0 through 9.5.3 fail to validate remote image domains when the inferSize option is enab

CVE-2026-84376 MEDIUM POC
6.3 Sep 02

Base-path prefix bypass in Astro prior to 7.2.4 allows unauthenticated remote attackers to reach protected server-side r

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy