CVE-2026-41067: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
CVE-2026-41067 is a cross-site scripting (XSS) vulnerability in the Astro web framework versions prior to 6. 1. 6. The issue arises from improper sanitization in the defineScriptVars function, which uses a case-sensitive regex to sanitize inline <script> tag injections. Because HTML parsers treat script tag closures case-insensitively and accept variations with whitespace or slashes, attackers can bypass this sanitization and inject arbitrary HTML or JavaScript. This vulnerability has a CVSS score of 6. 1 (medium severity) and is fixed in version 6. 1. 6.
AI Analysis
Technical Summary
Astro versions before 6.1.6 contain an XSS vulnerability due to the defineScriptVars function's use of a case-sensitive regular expression /<\/script>/g for sanitizing injected values in inline <script> tags. HTML parsers close <script> elements case-insensitively and accept variations such as </Script>, </script >, or </script/>, which the regex does not catch. This allows attackers to bypass sanitization and inject arbitrary HTML or JavaScript code. The vulnerability is addressed in Astro version 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
A fix is available in Astro version 6.1.6. Users and administrators should upgrade to version 6.1.6 or later to remediate this vulnerability. No other official remediation or temporary fixes are documented. Patch status is confirmed by the vendor advisory indicating the issue is fixed in 6.1.6.
CVE-2026-41067: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
Description
CVE-2026-41067 is a cross-site scripting (XSS) vulnerability in the Astro web framework versions prior to 6. 1. 6. The issue arises from improper sanitization in the defineScriptVars function, which uses a case-sensitive regex to sanitize inline <script> tag injections. Because HTML parsers treat script tag closures case-insensitively and accept variations with whitespace or slashes, attackers can bypass this sanitization and inject arbitrary HTML or JavaScript. This vulnerability has a CVSS score of 6. 1 (medium severity) and is fixed in version 6. 1. 6.
CVSS v3.1
Score 6.1medium
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Astro versions before 6.1.6 contain an XSS vulnerability due to the defineScriptVars function's use of a case-sensitive regular expression /<\/script>/g for sanitizing injected values in inline <script> tags. HTML parsers close <script> elements case-insensitively and accept variations such as </Script>, </script >, or </script/>, which the regex does not catch. This allows attackers to bypass sanitization and inject arbitrary HTML or JavaScript code. The vulnerability is addressed in Astro version 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
A fix is available in Astro version 6.1.6. Users and administrators should upgrade to version 6.1.6 or later to remediate this vulnerability. No other official remediation or temporary fixes are documented. Patch status is confirmed by the vendor advisory indicating the issue is fixed in 6.1.6.
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: 5/1/2026, 8:44:06 PM
Last updated: 6/7/2026, 11:29:59 AM
Views: 62
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.