CVE-2026-54298: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
Astro web framework versions prior to 6.4.6 contain a cross-site scripting (XSS) vulnerability in the spreadAttributes function used during server-side rendering. This function improperly escapes object keys when spreading attributes onto HTML elements, allowing untrusted input to inject arbitrary HTML attributes or elements. The vulnerability is fixed in version 6.4.6. The CVSS score is 4.2, indicating medium severity.
AI Analysis
Technical Summary
CVE-2026-54298 is a cross-site scripting vulnerability in the Astro web framework's server-side rendering pipeline. Specifically, the spreadAttributes function iterates over object keys and passes them directly to addAttribute without escaping, enabling injection of arbitrary HTML attributes or elements when using the spread syntax {...props} with untrusted input. This can lead to injection of event handlers or breaking out of attribute context. The issue is resolved in Astro version 6.4.6.
Potential Impact
An attacker can exploit this vulnerability by supplying untrusted input as object keys in the spread syntax, leading to injection of arbitrary HTML attributes, including event handlers, or new HTML elements. This can result in cross-site scripting attacks that may compromise client-side security. The impact is limited to confidentiality and integrity with no direct availability impact, reflected by the CVSS vector (AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N).
Mitigation Recommendations
This vulnerability is fixed in Astro version 6.4.6. Users should upgrade to version 6.4.6 or later to remediate this issue. No official patch or temporary fix information is provided beyond this version update. Until upgraded, avoid using untrusted input as object keys in the spread syntax for HTML attributes.
CVE-2026-54298: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in withastro astro
Description
Astro web framework versions prior to 6.4.6 contain a cross-site scripting (XSS) vulnerability in the spreadAttributes function used during server-side rendering. This function improperly escapes object keys when spreading attributes onto HTML elements, allowing untrusted input to inject arbitrary HTML attributes or elements. The vulnerability is fixed in version 6.4.6. The CVSS score is 4.2, indicating medium severity.
CVSS v3.1
Score 4.2medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-54298 is a cross-site scripting vulnerability in the Astro web framework's server-side rendering pipeline. Specifically, the spreadAttributes function iterates over object keys and passes them directly to addAttribute without escaping, enabling injection of arbitrary HTML attributes or elements when using the spread syntax {...props} with untrusted input. This can lead to injection of event handlers or breaking out of attribute context. The issue is resolved in Astro version 6.4.6.
Potential Impact
An attacker can exploit this vulnerability by supplying untrusted input as object keys in the spread syntax, leading to injection of arbitrary HTML attributes, including event handlers, or new HTML elements. This can result in cross-site scripting attacks that may compromise client-side security. The impact is limited to confidentiality and integrity with no direct availability impact, reflected by the CVSS vector (AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N).
Mitigation Recommendations
This vulnerability is fixed in Astro version 6.4.6. Users should upgrade to version 6.4.6 or later to remediate this issue. No official patch or temporary fix information is provided beyond this version update. Until upgraded, avoid using untrusted input as object keys in the spread syntax for HTML attributes.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-12T17:46:37.293Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a398861eed863c81e5021cb
Added to database: 06/22/2026, 19:09:21 UTC
Last enriched: 06/22/2026, 19:24:37 UTC
Last updated: 06/23/2026, 01:50:20 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.