# CVE-2026-126365: Astro Prism and Markdoc XSS via unsupported language

Source: https://junglewise.ai/threats/cve-2026-126365-astro-is-a-web-framework-for-content-driven-websites-prior-to  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-13. Updated: 2026-11-13  
License: CC BY 4.0 with a link back

CVE-2026-126365 · Severity: medium · CVSS 5.4 · Published 2026-11-13

Astro is a web framework used to build content-driven websites. When code blocks are labeled with programming languages that Prism doesn't recognize, the code could render as HTML and execute JavaScript instead of displaying as plain text. This allows injection of malicious scripts if an attacker can control the language label or supply code in an unsupported language.

Vendors: [Astro](https://junglewise.ai/threats/vendors/astro).

## Quick answers

**Is CVE-2026-126365 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-126365 being exploited in the wild.

**How severe is CVE-2026-126365?** Medium severity, with a CVSS score of 5.4, published 13 November 2026.

**Which products and versions are affected?** Astro @Astrojs/Markdoc 0.3.0 to 2.1.1; Astro @Astrojs/Prism prior to 4.1.2.

**Is there a fix for CVE-2026-126365?** Yes: fixed in @astrojs/prism 4.1.2, @astrojs/markdoc 2.1.2. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-126365 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-126365?** Check whether you run Astro @Astrojs/Markdoc or Astro @Astrojs/Prism at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in @astrojs/prism 4.1.2, @astrojs/markdoc 2.1.2

## Technical details

The runHighlighterWithAstro() function in @astrojs/prism returned code unchanged when Prism had no grammar for the requested language, and callers inserted the result as raw HTML without escaping. An attacker who controls the language parameter or supplies untrusted code with an unsupported language can inject and execute arbitrary HTML and JavaScript. The @astrojs/markdoc prism() extension compounds this by being vulnerable even when HTML rendering is disabled.

## Affected products

- Astro @astrojs/prism prior to 4.1.2
- Astro @astrojs/markdoc 0.3.0 to 2.1.1

## Timeline

- 2026-11-13: disclosed

## References

- [https://github.com/withastro/astro/commit/edfbf4ab34ff007ae8f7188af76a023a15c9443d](https://github.com/withastro/astro/commit/edfbf4ab34ff007ae8f7188af76a023a15c9443d)
- [https://github.com/withastro/astro/releases/tag/@astrojs/markdoc@2.1.2](https://github.com/withastro/astro/releases/tag/@astrojs/markdoc@2.1.2)
