{"id":"CVE-2026-59727","published":"2026-07-27T19:42:32Z","modified":"2026-07-28T15:20:18Z","title":"Astro: Cross-site scripting via unescaped transition:* directive values on hydrated islands","vendor":"withastro","product":"astro","tier":"tail","description":{"text":"Astro is a web framework for content-driven websites. In versions 3.10.0 through 7.0.3, 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). Exploitation requires the application developer to have written a non-idiomatic pattern — passing untrusted, request-derived input directly into a transition directive. Astro applications that do not route untrusted input into these directives are unaffected. This issue has been fixed in version 7.0.4.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.1,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00538,"percentile":0.3882,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-83","name":"Improper Neutralization of Script in Attributes in a Web Page"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-7pw4-f3q4-r2p2","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/withastro/astro/pull/17212","tags":["x_refsource_MISC"]},{"url":"https://github.com/withastro/astro/commit/7ba0bb1dc7516e88caff9abd7767322af44b0294","tags":["x_refsource_MISC"]},{"url":"https://github.com/withastro/astro/releases/tag/astro@7.0.4","tags":["x_refsource_MISC"]}],"priority":{"score":9.2,"factors":[{"name":"EPSS percentile","points":7.76},{"name":"CVSS severity","points":1.47}]},"vendorSlug":"withastro","affectedVersions":[{"vendor":"withastro","product":"astro","versions":[">= 3.10.0, < 7.0.4"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-28T15:08:17.872331Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"astro","vulnerableRanges":[">=3.10.0, <7.0.4"],"patched":["7.0.4"],"from":["GHSA-7pw4-f3q4-r2p2"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-49581","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-54298","published":"2026-06-22","fixed":"6.4.6","kev":false},{"cve":"CVE-2026-54299","published":"2026-06-22","fixed":"6.4.6","kev":false},{"cve":"CVE-2026-59731","published":"2026-07-08","fixed":"6.4.8","kev":false},{"cve":"CVE-2026-59727","published":"2026-07-27","fixed":"7.0.4","kev":false},{"cve":"CVE-2026-59729","published":"2026-07-27","fixed":"7.0.6","kev":false,"link":{"from":"CVE-2026-59727","to":"CVE-2026-59729","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:astro","fromFixed":"7.0.4","toFixed":"7.0.6","daysApart":0}]}},{"cve":"CVE-2026-73423","published":"2026-08-12","fixed":"7.0.6","kev":false,"link":{"from":"CVE-2026-59727","to":"CVE-2026-73423","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:astro","fromFixed":"7.0.4","toFixed":"7.0.6","daysApart":16}]}},{"cve":"CVE-2026-73422","published":"2026-08-12","fixed":"7.1.0","kev":false}],"package":"npm:astro"}}