{"id":"CVE-2026-41067","published":"2026-04-24T16:57:22Z","modified":"2026-04-24T18:16:55Z","title":"Astro: XSS via incomplete `</script>` sanitization in `define:vars` allows case-insensitive and whitespace-based bypass","vendor":"withastro","product":"astro","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0028,"percentile":0.13072,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-j687-52p2-xcff","tags":["x_refsource_CONFIRM"]}],"priority":{"score":6.9,"factors":[{"name":"EPSS percentile","points":2.61},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"withastro","affectedVersions":[{"vendor":"withastro","product":"astro","versions":["< 6.1.6"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-24T17:27:06.343054Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"astro","vulnerableRanges":["<6.1.6"],"patched":["6.1.6"],"from":["GHSA-j687-52p2-xcff"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-25573","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-66202","published":"2025-12-08","fixed":"5.15.8","kev":false},{"cve":"CVE-2025-65019","published":"2025-11-19","fixed":"5.15.9","kev":false},{"cve":"CVE-2026-33769","published":"2026-03-24","fixed":"5.18.1","kev":false},{"cve":"CVE-2026-41067","published":"2026-04-24","fixed":"6.1.6","kev":false},{"cve":"CVE-2026-45028","published":"2026-05-13","fixed":"6.1.10","kev":false,"link":{"from":"CVE-2026-41067","to":"CVE-2026-45028","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:astro","fromFixed":"6.1.6","toFixed":"6.1.10","daysApart":19}]}},{"cve":"CVE-2026-50146","published":"2026-06-22","fixed":"6.3.3","kev":false},{"cve":"CVE-2026-54298","published":"2026-06-22","fixed":"6.4.6","kev":false}],"package":"npm:astro"}}