What’s Vulnerable › Vulnerabilities
CVE-2026-41067: Astro: XSS via incomplete `</script>` sanitization in `define:vars` allows case-insensitive and whitespace-based bypass
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2026-04-24 · updated 2026-10-26
- Weakness: CWE-79
Description
Astro is a web framework. Prior to 6.1.6, the defineScriptVars function in Astro's server-side rendering pipeline uses a case-sensitive regex /<\/script>/g to sanitize values injected into inline <script> tags via the define:vars directive. HTML parsers close <script> elements case-insensitively and also accept whitespace or / before the closing >, allowing an attacker to bypass the sanitization with payloads like </Script>, </script >, or </script/> and inject arbitrary HTML/JavaScript. This vulnerability is fixed in 6.1.6.
Affected products
- withastro astro: before 6.1.6 — fixed in 6.1.6
How to fix
Upgrade to a fixed version: withastro astro 6.1.6. Check the vendor advisory for mitigations.
References
- https://github.com/withastro/astro/security/advisories/GHSA-j687-52p2-xcff
- https://github.com/withastro/astro/security/advisories/GHSA-j687-52p2-xcff
Get alerted when CVE-2026-41067 or the next vulnerability affects your stack