PT-2026-49739 · Astro · Astro
CVSS v3.1
6.1
Medium
| Vector | AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
Astro versions prior to 6.4.6
Description
The
spreadAttributes function in the server-side rendering pipeline iterates over object keys and passes them to the addAttribute() function, which interpolates the key into the HTML output without escaping. When a developer uses the spread syntax {...props} on an HTML element and the object keys originate from untrusted sources such as APIs, CMS, or URL parameters, an attacker can inject arbitrary HTML attributes. This includes event handlers like onmousemove and onclick, or breaking out of the attribute context to inject new elements, leading to cross-site scripting (XSS).Recommendations
Update to version 6.4.6.
As a temporary workaround, avoid using the spread syntax
{...props} on HTML elements when the object keys come from untrusted sources.Exploit
Fix
XSS
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Astro