Astro: XSS via unescaped code for unsupported languages in @astrojs/prism
CVE-2026-126365Published 12 Nov 2026, 22:36 UTC
Real-world risk
1.1/ 10Low
Routine
PreliminaryFrom the CVSS vector only · confidence low
CVSS
5.4
scored by the vendor (CNA), CVSS 3.1
In plain words
No plain-language summary yet. The original description is below.
Original description (from GitHub_M)
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.
Am I affected?
What to do
Update to a fixed version: 7.4.3, 2.1.2, 4.1.2.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | LowA real low-privileged account | From the CVSS vector | 0.60 |
| Victim interaction | RoutineA normal action: open a file, visit a page, click a link | From the CVSS vector | 0.70 |
| Configuration | DefaultOut-of-the-box installs are vulnerable | From the CVSS vector | 1.00 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.2% chance of exploitation in 30 days (percentile 12), as of 2026-12-05.
The arithmetic
- Prerequisites multiplied together0.420
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.42 × threat 0.851.071
- Rounded to one decimal between 0.1 and 101.1
Exploitation and evidence timeline
- 12 Nov 2026 Published
- 3 Dec 2026 Risk 1.1 (cvss fallback)
Weakness
CWE-79
References
- https://github.com/withastro/astro/security/advisories/GHSA-ff38-p3qj-4pmfvendor-advisory
- https://github.com/withastro/astro/commit/edfbf4ab34ff007ae8f7188af76a023a15c9443dmisc
- https://github.com/withastro/astro/releases/tag/@astrojs/[email protected]misc
- https://github.com/withastro/astro/releases/tag/@astrojs/[email protected]misc
- CVE-2026-126365 on CVE.org