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

CVE-2026-54298: Astro: XSS via Unescaped Attribute Names in Spread Props

June 16, 2026

The spreadAttributes function in Astro’s server-side rendering pipeline iterates over object keys and passes them directly to addAttribute, 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 come from an untrusted source (API, CMS, URL parameters), an attacker can inject arbitrary HTML attributes including event handlers like onmousemove, onclick, or break out of the attribute context entirely to inject new elements.

References

  • github.com/advisories/GHSA-jrpj-wcv7-9fh9
  • github.com/withastro/astro/security/advisories/GHSA-jrpj-wcv7-9fh9
  • nvd.nist.gov/vuln/detail/CVE-2026-54298

Code Behaviors & Features

Detect and mitigate CVE-2026-54298 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 6.4.6

Fixed versions

  • 6.4.6

Solution

Upgrade to version 6.4.6 or above.

Impact 4.2 MEDIUM

CVSS:3.1/AV:N/AC:H/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-54298.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Tue, 23 Jun 2026 12:23:31 +0000.