CVE-2026-59729 Astro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298)
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
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.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| npm astro(npm) | < 7.0.6 | 7.0.6 | Fixed |
| withastro astro | = < 7.0.6 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| withastro astro | = < 7.0.6 | No fix listed |
| npm astro(npm) | < 7.0.6 | 7.0.6 |
References
- https://github.com/withastro/astro/security/advisories/GHSA-f48w-9m4c-m7f5 exploit vendor-advisory
- https://github.com/withastro/astro/pull/17251 patch
- https://github.com/withastro/astro/commit/5240e26c9dd91f9bc7140dcfacdb48d5a132830d patch
- https://github.com/withastro/astro/releases/tag/astro@7.0.6
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com
- github.com product