CVE-2026-59729 Astro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298)

Medium 5.1 Published Updated

Attackers can execute arbitrary scripts via unescaped spread attribute names in Astro's renderHTMLElement function, affecting web applications built with the framework.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-59729?

CVE-2026-59729 is a medium-severity cross-site scripting vulnerability in withastro astro, published on 27 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-79

Which versions are affected by CVE-2026-59729?

2 open source packages ship an affected version, including astro.

PackageAffectedFixed in
astro npmAll versions7.0.6
astro npmAll versions7.0.6

How do I fix CVE-2026-59729?

Upgrade astro to 7.0.6 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-59729 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-59729 exists.

Sources

Also known as CLSA-2026-1788892753, CLSA-2026-1788970606, CLSA-2026-1792161561, CLSA-2026-1792161703, CLSA-2026-1792161706, CLSA-2026-1792161792 and 2 more.

Is CVE-2026-59729 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free