# CVE-2026-126365: Astro: XSS via unescaped code for unsupported languages in @astrojs/prism

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2026-11-12T22:36:18.099Z
- Modified: 2026-11-17T22:17:21.153Z
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- withastro astro: < 7.4.3
- @astrojs prism: < 4.1.2
- @astrojs markdoc: >= 0.3.0, < 2.1.2

## References

- <https://github.com/withastro/astro/security/advisories/GHSA-ff38-p3qj-4pmf>
- <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/prism@4.1.2>

## Sources

- CVE List: [CVE-2026-126365](https://www.cve.org/CVERecord?id=CVE-2026-126365), CVE Terms of Use, modified 2026-11-17
- NVD: [CVE-2026-126365](https://nvd.nist.gov/vuln/detail/CVE-2026-126365), Public domain, modified 2026-11-17

---

Page: https://cve.day/CVE-2026-126365 · Whole record: https://cve.day/CVE-2026-126365.json · Rebuilt by cve.day 2026-11-25T22:59:50.580Z
