Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. astro
  4. ›
  5. CVE-2026-59729

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

July 20, 2026

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, resulting in XSS.

References

  • github.com/advisories/GHSA-f48w-9m4c-m7f5
  • github.com/withastro/astro/commit/5240e26c9dd91f9bc7140dcfacdb48d5a132830d
  • github.com/withastro/astro/pull/17251
  • github.com/withastro/astro/releases/tag/astro@7.0.6
  • github.com/withastro/astro/security/advisories/GHSA-f48w-9m4c-m7f5
  • nvd.nist.gov/vuln/detail/CVE-2026-59729

Code Behaviors & Features

Detect and mitigate CVE-2026-59729 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 7.0.6

Fixed versions

  • 7.0.6

Solution

Upgrade to version 7.0.6 or above.

Impact 5.4 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/astro/CVE-2026-59729.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:22 +0000.