Impact
A flaw in Astro’s renderHTMLElement function allows an attacker to inject unescaped attribute names into a native‑HTMLElement subclass component. The renderHTMLElement method contains an inline attribute loop that does not use the addAttribute guard, so the attribute name is interpolated directly into the output without proper escaping. This bypass lets an attacker break out of the attribute context and inject arbitrary JavaScript. The vulnerability is a classic client‑side XSS, classified as CWE‑79, and can lead to malicious script execution in the victim’s browser, enabling data theft, session hijacking, or defacement.
Affected Systems
Astro withastro/astro – all releases before version 7.0.6. The issue is resolved in release 7.0.6 and later. Any project using earlier Astro versions and rendering components that receive spread props from untrusted sources remains affected.
Risk and Exploitability
The CVSS score of 5.1 indicates moderate severity. The EPSS score of < 1% suggests a low but non‑zero likelihood of exploitation. The vulnerability is not listed in the CISA KEV catalog, indicating that large‑scale exploitation has not been observed to date. The flaw can be triggered through crafted data supplied to any component that accepts spread props from untrusted sources at runtime; the affected attribute name is rendered unescaped, providing a client‑side code execution path. Since the impact remains confined to the browser, an attacker can steal credentials or deface the site. Prompt patching is the most reliable mitigation.
OpenCVE Enrichment
Github GHSA