` sanitization in `define:vars` allows case-insensitive and whitespace-based bypass","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 , , or and inject arbitrary HTML/JavaScript. This vu","image":"https://o3.security/opengraph.png","datePublished":"2026-04-24T16:57:22.940Z","dateModified":"2026-08-07T11:31:23.156748983Z","url":"https://o3.security/vulnerability/CVE-2026-41067","inLanguage":"en","author":{"@id":"https://o3.security/#organization"},"publisher":{"@id":"https://o3.security/#organization"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://o3.security/vulnerability/CVE-2026-41067"},"speakable":{"@type":"SpeakableSpecification","cssSelector":["h1",".vuln-summary",".vuln-severity",".vuln-mitigation"]},"about":[{"@type":"SoftwareApplication","name":"astro","applicationCategory":"npm","softwareVersion":"6.1.6"}],"citation":[{"@type":"WebPage","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41067.json"},{"@type":"WebPage","url":"https://github.com/withastro/astro/security/advisories/GHSA-j687-52p2-xcff"},{"@type":"WebPage","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41067"}]}` sanitization in `define:vars` allows case-insensitive and whitespace-based bypass","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 , , or and inject arbitrary HTML/JavaScript. This vu","url":"https://o3.security/vulnerability/CVE-2026-41067","identifier":"CVE-2026-41067","datePublished":"2026-04-24T16:57:22.940Z","dateModified":"2026-08-07T11:31:23.156748983Z","inLanguage":"en","license":"https://creativecommons.org/licenses/by/4.0/","keywords":["CVE-2026-41067","MEDIUM severity","CVE","vulnerability","security advisory"],"creator":{"@id":"https://o3.security/#organization"},"isAccessibleForFree":true,"variableMeasured":[{"@type":"PropertyValue","name":"CVSS Base Score","value":6.1,"description":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},{"@type":"PropertyValue","name":"Severity","value":"MEDIUM"}]}, , or and inject arbitrary HTML/JavaScript. This vulnerability is fixed in 6.1.6."}},{"@type":"Question","name":"How severe is CVE-2026-41067?","acceptedAnswer":{"@type":"Answer","text":"CVE-2026-41067 has a CVSS score of 6.1/10, rated MEDIUM. Review your exposure and patch according to your risk tolerance."}},{"@type":"Question","name":"Which packages are affected by CVE-2026-41067?","acceptedAnswer":{"@type":"Answer","text":"CVE-2026-41067 affects the following packages: astro (npm). Ecosystems affected: npm."}},{"@type":"Question","name":"How do I fix CVE-2026-41067?","acceptedAnswer":{"@type":"Answer","text":"Update astro to 6.1.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-41067 is resolved across your whole dependency graph."}},{"@type":"Question","name":"How do I detect CVE-2026-41067 in my npm dependencies?","acceptedAnswer":{"@type":"Answer","text":"Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for astro. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match."}},{"@type":"Question","name":"How do I mitigate CVE-2026-41067 if there is no patch (or I can't update yet)?","acceptedAnswer":{"@type":"Answer","text":"If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands."}},{"@type":"Question","name":"How does O3 Security protect against CVE-2026-41067?","acceptedAnswer":{"@type":"Answer","text":"O3 pinpoints whether CVE-2026-41067 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed."}},{"@type":"Question","name":"Is CVE-2026-41067 actively exploited in the wild?","acceptedAnswer":{"@type":"Answer","text":"No public exploit code has been indexed for CVE-2026-41067 yet. This does not mean the vulnerability cannot be exploited — absence of public exploits does not imply safety. Apply the recommended fix and use O3 Security to monitor your exposure."}},{"@type":"Question","name":"When was CVE-2026-41067 published, and has it been updated?","acceptedAnswer":{"@type":"Answer","text":"CVE-2026-41067 was published on April 24, 2026 and was last updated on August 7, 2026. Advisory data evolves as severity scores, affected ranges, and exploit intelligence are revised — always check the latest version of the advisory before acting."}}]}
Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

CVE-2026-41067

MEDIUM

CVE-2026-41067 is a medium-severity (CVSS 6.1) vulnerability in astro. O3 Security confirms whether CVE-2026-41067 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

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

Also known asGHSA-j687-52p2-xcff
Published
Apr 24, 2026
Updated
Aug 7, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

astronpm
4.3Mdownloads / week

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmastroall versions6.1.6

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for astro. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update astro to 6.1.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-41067 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether CVE-2026-41067 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to CVE-2026-41067. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2026-41067 in your dependencies?

O3 detects CVE-2026-41067 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.