MEDIUMCVSS v3.1 6.5Vulnerability

CVE-2026-114128

## 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 `[email protected]`. ## 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 Report

Properties

Severity
medium
Summary
Astro: Reflected/Stored XSS via unescaped <script>/<style> tag content in JSX/MDX rendering
Nvd fetched at
2026-10-22T22:14:18.200859+00:00
Epss score
0.00263
Cvss severity
MEDIUM
Cvss score
6.5
Retrieved at
2026-10-22T22:17:33+00:00
Ghsa published
2026-10-22T16:30:26Z
Source url
https://github.com/advisories/GHSA-98hj-9722-w3j8
Ghsa updated
2026-10-22T16:30:27Z
Ghsa id
GHSA-98hj-9722-w3j8
Last source
FIRST EPSS
Score
6.5
Cvss version
3.1
Cve id
CVE-2026-114128
Cvss vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
First seen by Signal
2026-10-21T22:34:38+00:00
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
Published at
2026-10-21T18:17:25.507

Related Entities (3)

AFFECTS (1)

→[Software]npm/astro

VULNERABLE_TO (1)

←[Software]npm/astro

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-114128 (CVSS v3.1 6.5) — Ninja Signal Threat Intelligence | Ninja Signal