CVE-2026-41067
MEDIUM 6.1CVSS 3.1Astro: XSS in define:vars via incomplete </script> tag sanitization
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.
- Published
- 24 Apr 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-j687-52p2-xcff
- Sources
- NVDJSONOSV GHSA-j687-52p2-xcffJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | astro | astrocpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:* |
< 6.1.6 | 6.1.6 |
| OSV | npm | astro | < 6.1.6 | 6.1.6 |
References
- https://github.com/withastro/astro/security/advisories/GHSA-j687-52p2-xcff · Exploit, Mitigation, Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-41067 · ADVISORY
- https://github.com/withastro/astro · PACKAGE
- https://github.com/withastro/astro/releases/tag/astro@6.1.6 · WEB
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 24 Apr 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 21 Apr 2026)