Astro: XSS via incomplete `</script>` sanitization in `define:vars` allows case-insensitive and whitespace-based bypass
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | ||||||
|---|---|---|---|---|---|---|---|---|---|
| withastro | astro | affected |
|
No data.
| Vendor | Product | Versions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Astro | Astro |
|
||||||||
| Withastro | Astro |
|
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-j687-52p2-xcff | Astro: XSS in define:vars via incomplete </script> tag sanitization |
No CVSS v4.0
No CVSS v3.0
No CVSS v2
This CVE is not in the KEV list.
Exploit prediction score: < 1% (0.189% probability within 30 days)
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Withastro
Withastro astro |
|
| Vendors & Products |
Withastro
Withastro astro |
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Astro
Astro astro |
|
| CPEs | cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:* | |
| Vendors & Products |
Astro
Astro astro |
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Astro: XSS via incomplete `</script>` sanitization in `define:vars` allows case-insensitive and whitespace-based bypass | |
| Weaknesses | CWE-79 | |
| References |
| |
| Metrics |
cvssV3_1
|