Skip to main content
EPSS 0.3%top 75%

CVE-2026-59729: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro

0
Medium
VulnerabilityCVE-2026-59729cvecve-2026-59729cwe-79
Published: 07/27/2026 (07/27/2026, 19:38:40 UTC)
Source: CVE Database V5
Vendor/Project: withastro
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
None
Subsq. Confidentiality
Low
Subsq. Integrity
Low
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N

Affected software

withastro

astro

Affected versions
<7.0.6

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/29/2026, 23:55:35 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses