llamaCVEVulnerability Intelligence
/
Advisory · GitHub · npm · astro

GHSA-98HJ-9722-W3J8

Astro: Reflected/Stored XSS via unescaped <script>/<style> tag content in JSX/MDX rendering

Parche disponible
Descargar PNG JSON
CVSS
—
medium
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche a -44 d de la divulgación
Exposición29 dDesde la divulgación, 22 oct 2026, 11:30 a. m.
Detección25 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Parche 7.3.2
Monitoreo
Detectada
8 sept 26
22 oct 26
17 nov 26
20 nov 26
8 sept 26
26 sept 26
15 oct 26
2 nov 26
20 nov 26
FechaFaseEventoDetalle
Remediación Parche 7.3.2 astro · -44 d desde divulgación
Divulgación Publicada GHSA-98HJ-9722-W3J8 divulgada
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

Astro's JSX and MDX rendering pipeline treated string children of `<script>` and `<style>` elements as trusted HTML. When a dynamic value was passed through a JSX expression, such as `<script>{value}</script>`, an attacker-controlled value containing `</script>` or `</style>` could terminate the element and inject arbitrary HTML and JavaScript.

Other JSX expression contexts escaped dynamic strings automatically. This behavior was limited to `<script>` and `<style>` children rendered through Astro's `astro:jsx` renderer, including MDX components.

Details

The affected rendering paths marked all string children of `<script>` and `<style>` elements as safe HTML, without distinguishing literal content generated by the compiler from dynamic expression values. An application was vulnerable when attacker-controlled data, such as a query parameter or CMS field, was interpolated directly into one of these elements.

For example, a value containing `</script><script>alert(1)</script>` passed to `<script>{value}</script>` was emitted without escaping. The browser interpreted the first closing tag as markup and executed the injected script.

The fix preserves raw rendering for literal script and style content while escaping dynamic string children like other JSX expression values.

Impact

Affected applications could be vulnerable to reflected or stored cross-site scripting. Exploitation required an application to pass attacker-controlled data directly as a dynamic child of a `<script>` or `<style>` element in MDX or through the `astro:jsx` runtime. Successful exploitation allowed arbitrary JavaScript execution in the victim's browser under the application's origin.

Patches

This issue is patched in `astro@7.3.2`.

Workarounds

Do not interpolate untrusted dynamic values directly into `<script>` or `<style>` element children. Applications that cannot upgrade should validate and contextually encode these values before rendering them.

Credit

Reported by @RKasai127 https://github.com/RKasai127.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Versiones

Rangos afectados

Afectada Corregida Última
astro< 7.3.2
7.3.2
7.4.12
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
npmastro
Corregida 7.3.2 -44 d 7.4.12 no afectada
Versiones corregidas7.3.2
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-114128
Otrahttps://github.com/withastro/astro/security/advisories/GHSA-98hj-9722-w3j8
Otrahttps://github.com/withastro/astro/pull/17896
Otrahttps://github.com/withastro/astro/commit/a548223607b9bb146d5d90ddda495343f9a2a739
Otrahttps://github.com/withastro/astro
Otrahttps://github.com/withastro/astro/releases/tag/astro@7.3.2

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.