CVE-2026-114128: Astro: Reflected/Stored XSS via unescaped <script>/<style> tag content in JSX/MDX rendering
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.
References
- github.com/advisories/GHSA-98hj-9722-w3j8
- github.com/withastro/astro/commit/a548223607b9bb146d5d90ddda495343f9a2a739
- github.com/withastro/astro/pull/17896
- github.com/withastro/astro/releases/tag/astro@7.3.2
- github.com/withastro/astro/security/advisories/GHSA-98hj-9722-w3j8
- nvd.nist.gov/vuln/detail/CVE-2026-114128
Code Behaviors & Features
Detect and mitigate CVE-2026-114128 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →