{"id":"CVE-2026-59729","published":"2026-07-27T19:38:40Z","modified":"2026-07-28T13:48:46Z","title":"Astro: XSS via unescaped spread attribute names in renderHTMLElement (incomplete fix for CVE-2026-54298)","vendor":"withastro","product":"astro","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.1,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00538,"percentile":0.38821,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/withastro/astro/security/advisories/GHSA-f48w-9m4c-m7f5","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/withastro/astro/pull/17251","tags":["x_refsource_MISC"]},{"url":"https://github.com/withastro/astro/commit/5240e26c9dd91f9bc7140dcfacdb48d5a132830d","tags":["x_refsource_MISC"]},{"url":"https://github.com/withastro/astro/releases/tag/astro@7.0.6","tags":["x_refsource_MISC"]}],"priority":{"score":11.3,"factors":[{"name":"EPSS percentile","points":7.76},{"name":"CVSS severity","points":3.57}]},"vendorSlug":"withastro","affectedVersions":[{"vendor":"withastro","product":"astro","versions":["< 7.0.6"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-28T13:48:15.250062Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"astro","vulnerableRanges":["<7.0.6"],"patched":["7.0.6"],"from":["GHSA-f48w-9m4c-m7f5"],"provenance":"source"}],"summary":{"text":"The Astro web framework (withastro/astro) prior to 7.0.6 has an incomplete fix for cross-site scripting: the renderHTMLElement() function in packages/astro/src/runtime/server/render/dom.ts builds attributes in its own loop, bypassing the attribute-name guard added to addAttribute(), so attribute names from spread props are interpolated unescaped. An attacker who can supply untrusted prop keys spread onto a native-HTMLElement-subclass component can break out of the attribute context and inject script, provided a user interacts with the affected page.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:56:08Z"},"euvd":{"id":"EUVD-2026-49580","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-withastro-astro-cve-2026-59729","children":[{"from":"CVE-2026-59729","to":"CVE-2026-126361","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/astro/src/runtime/server/render/util.ts"],"commits":["https://github.com/withastro/astro/commit/e023abac912d7cb6af2b9fb5107ef5dabc667096","https://github.com/withastro/astro/commit/5240e26c9dd91f9bc7140dcfacdb48d5a132830d"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2026-54299","published":"2026-06-22","fixed":"6.4.6","kev":false},{"cve":"CVE-2026-59731","published":"2026-07-08","fixed":"6.4.8","kev":false},{"cve":"CVE-2026-59727","published":"2026-07-27","fixed":"7.0.4","kev":false,"link":{"from":"CVE-2026-59727","to":"CVE-2026-59729","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"npm:astro","fromFixed":"7.0.4","toFixed":"7.0.6","daysApart":0}]}},{"cve":"CVE-2026-59729","published":"2026-07-27","fixed":"7.0.6","kev":false},{"cve":"CVE-2026-73423","published":"2026-08-12","fixed":"7.0.6","kev":false},{"cve":"CVE-2026-73422","published":"2026-08-12","fixed":"7.1.0","kev":false},{"cve":"CVE-2026-84376","published":"2026-09-02","fixed":"7.2.4","kev":false}],"package":"npm:astro"}}