CVE-2026-59727: Astro: Cross-site scripting via unescaped transition:* directive values on hydrated islands
When a transition:persist, transition:scope, or transition:persist-props directive is applied to a client-hydrated (client:*) component, Astro copied the directive value onto the rendered <astro-island> element without HTML-escaping it. If a developer reflects attacker-controlled input into one of these directives, an attacker can break out of the attribute and inject arbitrary HTML/JavaScript into the server-rendered output, resulting in reflected cross-site scripting (XSS).
References
- github.com/advisories/GHSA-7pw4-f3q4-r2p2
- github.com/withastro/astro/commit/7ba0bb1dc7516e88caff9abd7767322af44b0294
- github.com/withastro/astro/pull/17212
- github.com/withastro/astro/releases/tag/astro@7.0.4
- github.com/withastro/astro/security/advisories/GHSA-7pw4-f3q4-r2p2
- nvd.nist.gov/vuln/detail/CVE-2026-59727
Code Behaviors & Features
Detect and mitigate CVE-2026-59727 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →