CVE-2026-126365
Astro XSS in prism code block highlighting
An attacker can inject HTML and script that runs in a user's browser after they take an action.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Fuente: CNA
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | CVE-2026-126365 divulgada · CVSS 5.4 (CNA) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Fuente: NIST NVD | Registro visto por primera vez en NIST NVD | |
| Monitoreo | Fuente: ENISA EUVD | Registro visto por primera vez en ENISA EUVD | |
| Monitoreo | Fuente: OSV | Registro visto por primera vez en OSV | |
| Divulgación | Evaluación SSVC | CISA-ADP · explotación ninguna | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Astro and the @astrojs/prism and @astrojs/markdoc packages can render embedded HTML and script from a code block labeled with an unsupported language, instead of showing it as text. An attacker with a low-privilege account can reach this remotely, but a user must take an action before the script runs.
Descripción original del registro (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.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
astro |
Corregida | 7.4.3 | — | — |
prism |
Corregida | 4.1.2 | — | — |
markdoc |
Corregida | 2.1.2 | — | — |
2.1.24.1.27.4.3Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/withastro/astro/security/advisories/GHSA-ff38-p3qj-4pmfhttps://github.com/withastro/astro/commit/edfbf4ab34ff007ae8f7188af76a023a15c9443dhttps://github.com/withastro/astro/releases/tag/@astrojs/markdoc@2.1.2https://github.com/withastro/astro/releases/tag/@astrojs/prism@4.1.2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
