CVE-2026-126365
Astro: XSS via unescaped code for unsupported languages in @astrojs/prism
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.
Fixes and workarounds
No remediation reported in collected sources.
Missing remediation information is not evidence that no patch exists.
Affected products and versions
| Product | Versions | Authority |
|---|---|---|
| astro withastro |
< 7.4.3 (affected) | CNA: GitHub_M |
| prism @astrojs |
< 4.1.2 (affected) | CNA: GitHub_M |
| markdoc @astrojs |
>= 0.3.0, < 2.1.2 (affected) | CNA: GitHub_M |
Version ranges are source assertions. Check the vendor advisory and your installed configuration before determining exposure.
CVSS assessments
| Version / score | Vector | Authority |
|---|---|---|
| 3.1 / 5.4 medium |
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N | CNA: GitHub_M |
Exploit evidence
No exploit evidence in collected sources. This is not proof of no exploitation.
References
- https://github.com/withastro/astro/security/advisories/GHSA-ff38-p3qj-4pmfCNA: GitHub_M · x_refsource_CONFIRM
- https://github.com/withastro/astro/commit/edfbf4ab34ff007ae8f7188af76a023a15c9443dCNA: GitHub_M · x_refsource_MISC
- https://github.com/withastro/astro/releases/tag/@astrojs/[email protected]CNA: GitHub_M · x_refsource_MISC
- https://github.com/withastro/astro/releases/tag/@astrojs/[email protected]CNA: GitHub_M · x_refsource_MISC
For agents and automation
Read public disclosures for free as Markdown or JSON. Compatible browsers also expose native WebMCP tools to search disclosures, read this page, and discover API access.
Use the ontology-linked Cyber API with x402 pay per request, or a Y2 Pro or Elite API key with the intel:cyber scope.
Endpoints and access details
https://api.y2.dev/api/v2/cyber/cveshttps://api.y2.dev/api/v2/cyber/cves/{cveId}
A workspace owner or admin can create a Pro or Elite API key. Send Authorization: Bearer <Y2_API_KEY> from your trusted agent runtime.
For x402, omit Authorization and read the HTTP 402 payment challenge before signing a retry. Public browser tools do not make payments.