Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. astro
  4. ›
  5. CVE-2026-59727

CVE-2026-59727: Astro: Cross-site scripting via unescaped transition:* directive values on hydrated islands

July 20, 2026

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 →

Affected versions

All versions starting from 3.10.0 before 7.0.4

Fixed versions

  • 7.0.4

Solution

Upgrade to version 7.0.4 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-116: Improper Encoding or Escaping of Output
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-83: Improper Neutralization of Script in Attributes in a Web Page

Source file

npm/astro/CVE-2026-59727.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:19 +0000.