CVE-2026-41067: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
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.
AI Analysis
Technical Summary
Astro versions before 6.1.6 contain an XSS vulnerability due to the defineScriptVars function relying on a case-sensitive regex /<\/script>/g to sanitize script tag injections. HTML parsers interpret closing script tags case-insensitively and accept whitespace or slashes before the closing >, enabling attackers to bypass this sanitization and inject malicious code. This vulnerability allows injection of arbitrary HTML/JavaScript via the define:vars directive in server-side rendering. The issue is resolved in Astro 6.1.6.
Potential Impact
Successful exploitation allows an attacker to inject arbitrary HTML or JavaScript into web pages rendered by vulnerable versions of Astro, potentially leading to cross-site scripting attacks. This can result in limited confidentiality and integrity impacts, such as theft of user data or session tokens, but does not affect availability. There are no known exploits in the wild at this time.
Mitigation Recommendations
This vulnerability is fixed in Astro version 6.1.6. Users should upgrade to version 6.1.6 or later to remediate the issue. No other official remediation or temporary fixes are documented. Patch status is confirmed by the vendor's versioning information.
CVE-2026-41067: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Astro versions before 6.1.6 contain an XSS vulnerability due to the defineScriptVars function relying on a case-sensitive regex /<\/script>/g to sanitize script tag injections. HTML parsers interpret closing script tags case-insensitively and accept whitespace or slashes before the closing >, enabling attackers to bypass this sanitization and inject malicious code. This vulnerability allows injection of arbitrary HTML/JavaScript via the define:vars directive in server-side rendering. The issue is resolved in Astro 6.1.6.
Potential Impact
Successful exploitation allows an attacker to inject arbitrary HTML or JavaScript into web pages rendered by vulnerable versions of Astro, potentially leading to cross-site scripting attacks. This can result in limited confidentiality and integrity impacts, such as theft of user data or session tokens, but does not affect availability. There are no known exploits in the wild at this time.
Mitigation Recommendations
This vulnerability is fixed in Astro version 6.1.6. Users should upgrade to version 6.1.6 or later to remediate the issue. No other official remediation or temporary fixes are documented. Patch status is confirmed by the vendor's versioning information.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-16T16:43:03.174Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69eba2fd87115cfb68542cd5
Added to database: 4/24/2026, 5:06:05 PM
Last enriched: 4/24/2026, 5:21:18 PM
Last updated: 4/24/2026, 7:48:16 PM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.