# CVE-2026-41067: Astro: XSS via incomplete `</script>` sanitization in `define:vars` allows case-insensitive and whitespace-based bypass

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 9% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-21T20:39:49.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-j687-52p2-xcff
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- withastro astro: < 6.1.6
- astro (npm): before 6.1.6
- astro astro: before 6.1.6

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## 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)

## Sources

- CVE List: [CVE-2026-41067](https://www.cve.org/CVERecord?id=CVE-2026-41067), CVE Terms of Use, modified 2026-04-24
- GitHub Advisory Database: [GHSA-j687-52p2-xcff](https://github.com/advisories/GHSA-j687-52p2-xcff), CC-BY-4.0, modified 2026-05-05
- NVD: [CVE-2026-41067](https://nvd.nist.gov/vuln/detail/CVE-2026-41067), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-41067 · Whole record: https://cve.day/CVE-2026-41067.json · Rebuilt by cve.day 2026-11-25T22:59:19.547Z
