CVE-2026-59729: 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. Versions prior to 7.0.6 are vulnerable to XSS through unescaped spread attribute names in renderHTMLElement. The fix for CVE-2026-54298 (GHSA-jrpj-wcv7-9fh9) added an INVALID_ATTR_NAME_CHAR guard to addAttribute() so that spread-prop attribute names containing "' >/= or whitespace are dropped. A second attribute-rendering path, renderHTMLElement() in packages/astro/src/runtime/server/render/dom.ts, has its own inline attribute loop that does not go through addAttribute() and was not updated. It interpolates the attribute name unescaped and only escapes the value, so untrusted prop keys spread onto a native-HTMLElement-subclass component can still break out of the attribute context. This issue has been fixed in version 7.0.6.
AI Analysis
Technical Summary
CVE-2026-59729 is a cross-site scripting vulnerability in the Astro web framework affecting versions before 7.0.6. The vulnerability stems from the renderHTMLElement function in packages/astro/src/runtime/server/render/dom.ts, which interpolates attribute names without escaping them, while only escaping attribute values. Although a previous fix for CVE-2026-54298 added a guard in addAttribute() to drop invalid attribute names, renderHTMLElement uses a separate attribute rendering path that was not updated. This allows untrusted spread property keys containing characters like ' >/= or whitespace to inject malicious scripts. The issue is resolved in Astro version 7.0.6.
Potential Impact
An attacker can exploit this vulnerability by supplying untrusted property keys that get spread onto native HTMLElement components, enabling cross-site scripting attacks. This can lead to the execution of arbitrary scripts in the context of the affected web application, potentially compromising user data or session integrity. The CVSS 4.0 base score is 5.1 (medium severity), indicating a moderate risk with network attack vector, no privileges required, and user interaction needed.
Mitigation Recommendations
This vulnerability is fixed in Astro version 7.0.6. Users should upgrade to version 7.0.6 or later to remediate this issue. No other mitigation or temporary workaround is indicated. Patch status is not explicitly stated in the vendor advisory fields, but the fix is confirmed in version 7.0.6.
CVE-2026-59729: 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. Versions prior to 7.0.6 are vulnerable to XSS through unescaped spread attribute names in renderHTMLElement. The fix for CVE-2026-54298 (GHSA-jrpj-wcv7-9fh9) added an INVALID_ATTR_NAME_CHAR guard to addAttribute() so that spread-prop attribute names containing "' >/= or whitespace are dropped. A second attribute-rendering path, renderHTMLElement() in packages/astro/src/runtime/server/render/dom.ts, has its own inline attribute loop that does not go through addAttribute() and was not updated. It interpolates the attribute name unescaped and only escapes the value, so untrusted prop keys spread onto a native-HTMLElement-subclass component can still break out of the attribute context. This issue has been fixed in version 7.0.6.
CVSS v4.0
Score 5.1medium
Affected software
withastro
astro
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-59729 is a cross-site scripting vulnerability in the Astro web framework affecting versions before 7.0.6. The vulnerability stems from the renderHTMLElement function in packages/astro/src/runtime/server/render/dom.ts, which interpolates attribute names without escaping them, while only escaping attribute values. Although a previous fix for CVE-2026-54298 added a guard in addAttribute() to drop invalid attribute names, renderHTMLElement uses a separate attribute rendering path that was not updated. This allows untrusted spread property keys containing characters like ' >/= or whitespace to inject malicious scripts. The issue is resolved in Astro version 7.0.6.
Potential Impact
An attacker can exploit this vulnerability by supplying untrusted property keys that get spread onto native HTMLElement components, enabling cross-site scripting attacks. This can lead to the execution of arbitrary scripts in the context of the affected web application, potentially compromising user data or session integrity. The CVSS 4.0 base score is 5.1 (medium severity), indicating a moderate risk with network attack vector, no privileges required, and user interaction needed.
Mitigation Recommendations
This vulnerability is fixed in Astro version 7.0.6. Users should upgrade to version 7.0.6 or later to remediate this issue. No other mitigation or temporary workaround is indicated. Patch status is not explicitly stated in the vendor advisory fields, but the fix is confirmed in version 7.0.6.
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: 6a67c6709c2644c7f8d3da86
Added to database: 07/27/2026, 20:58:24 UTC
Last enriched: 07/29/2026, 23:55:35 UTC
Last updated: 09/10/2026, 20:44:46 UTC
Views: 88
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.