Astro Reflected XSS Vulnerability: Early Warning
An early warning has been issued regarding a high severity reflected XSS vulnerability in Astro's server-side View Transition CSS generator. This vulnerability, tracked as GHSA-4G3V-8H47-V7G6, reportedly allows attackers to inject arbitrary HTML or JavaScript by passing untrusted data to animation properties.
What happened
The vulnerability arises from Astro's View Transition CSS generator interpolating animation properties into an inline <style> element without proper escaping for CSS and HTML contexts. An attacker can exploit this by passing a value containing a </style> sequence to an animation property, which terminates the style element and allows for the injection of arbitrary HTML or JavaScript.
To assess your exposure, check if your project uses Astro and if you are passing untrusted data to animation properties. The vulnerability affects multiple versions of Astro, with fixes available in versions 6.4.6, 5.0.8, 4.16.18, 7.1.0, 5.14.3, 6.3.3, 4.16.17, 5.12.8, 5.15.9, 5.18.1, 5.15.8, 5.15.5, 6.1.6, 6.4.6, 4.16.1, 5.13.10, 5.15.6, 5.15.8, 5.14.3, 5.13.2, 4.16.19, 6.1.10, and the last affected version is 7.1.0.
The recommended action is to upgrade to the latest version of Astro and avoid passing untrusted data to animation properties. For more detailed information, consult the primary source: [GHSA-4g3v-8h47-v7g6] Astro: Reflected XSS via unescaped View Transition animation properties.
How 0Day mitigates this
astro is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.