CVE-2026-59727: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
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.
AI Analysis
Technical Summary
The vulnerability in Astro (versions 3.10.0 through 7.0.3) involves improper neutralization of input during web page generation (CWE-79). When the transition:persist, transition:scope, or transition:persist-props directives are applied to client-hydrated components, Astro copies the directive values onto the <astro-island> element without HTML-escaping. If a developer passes untrusted, attacker-controlled input into these directives, it can lead to reflected XSS by breaking out of the attribute context and injecting arbitrary HTML/JavaScript into server-rendered output. This requires a non-idiomatic developer pattern and is not exploitable if untrusted input is not routed into these directives. The vulnerability is resolved in Astro version 7.0.4.
Potential Impact
Successful exploitation allows an attacker to inject arbitrary HTML or JavaScript into the server-rendered output, leading to reflected cross-site scripting (XSS). This can result in execution of malicious scripts in the context of the victim's browser. However, exploitation requires that the developer explicitly passes untrusted input into the vulnerable directives, which is not typical. The CVSS 4.0 score is low (2.1), reflecting the limited attack vector and required conditions.
Mitigation Recommendations
This vulnerability is fixed in Astro version 7.0.4. Users should upgrade to version 7.0.4 or later to remediate the issue. Applications that do not pass untrusted input into the affected transition directives are not vulnerable. No other vendor advisory or patch information is available; therefore, patch status is confirmed by the fixed version 7.0.4. No additional mitigation steps are indicated.
CVE-2026-59727: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
Description
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.
CVSS v4.0
Score 2.1low
Affected software
withastro
astro
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Astro (versions 3.10.0 through 7.0.3) involves improper neutralization of input during web page generation (CWE-79). When the transition:persist, transition:scope, or transition:persist-props directives are applied to client-hydrated components, Astro copies the directive values onto the <astro-island> element without HTML-escaping. If a developer passes untrusted, attacker-controlled input into these directives, it can lead to reflected XSS by breaking out of the attribute context and injecting arbitrary HTML/JavaScript into server-rendered output. This requires a non-idiomatic developer pattern and is not exploitable if untrusted input is not routed into these directives. The vulnerability is resolved in Astro version 7.0.4.
Potential Impact
Successful exploitation allows an attacker to inject arbitrary HTML or JavaScript into the server-rendered output, leading to reflected cross-site scripting (XSS). This can result in execution of malicious scripts in the context of the victim's browser. However, exploitation requires that the developer explicitly passes untrusted input into the vulnerable directives, which is not typical. The CVSS 4.0 score is low (2.1), reflecting the limited attack vector and required conditions.
Mitigation Recommendations
This vulnerability is fixed in Astro version 7.0.4. Users should upgrade to version 7.0.4 or later to remediate the issue. Applications that do not pass untrusted input into the affected transition directives are not vulnerable. No other vendor advisory or patch information is available; therefore, patch status is confirmed by the fixed version 7.0.4. No additional mitigation steps are indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-07-06T15:34:16.917Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a67c6709c2644c7f8d3da78
Added to database: 07/27/2026, 20:58:24 UTC
Last enriched: 07/29/2026, 23:47:02 UTC
Last updated: 09/10/2026, 20:02:38 UTC
Views: 83
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.