CVE Catalog

CVE-2026-41067

MediumCVSS 6.1
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.19%

8th percentile - higher than 8% of all known CVEs

Summary

In Astro prior to 6.1.6, the defineScriptVars function in the 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 sanitization with payloads like </Script>, </script >, or </script/> and inject arbitrary HTML/JavaScript. This vulnerability is fixed in 6.1.6.

Risk Assessment

An attacker can inject arbitrary HTML/JavaScript into pages rendered by the application, leading to XSS that may result in session theft or actions performed on behalf of the user.

Recommendation

Upgrade Astro to version 6.1.6 or later. Until patched, avoid using the define:vars directive with untrusted data.

Other vulnerabilities in Astro

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS