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

CVE-2026-50146: Astro: Reflected XSS via unescaped slot name

June 16, 2026

When a component uses a client:* directive, Astro inserts named slot content into a data-astro-template attribute without HTML escaping the slot name allowing an attacker to break out of the attribute context and inject arbitrary HTML, resulting in reflected XSS during SSR.

This is similar to GHSA-wrwg-2hg8-v723 but exploits a different injection point.

References

  • github.com/advisories/GHSA-8hv8-536x-4wqp
  • github.com/withastro/astro/security/advisories/GHSA-8hv8-536x-4wqp
  • nvd.nist.gov/vuln/detail/CVE-2026-50146

Code Behaviors & Features

Detect and mitigate CVE-2026-50146 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.3.3

Fixed versions

  • 6.3.3

Solution

Upgrade to version 6.3.3 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
  • CWE-80: Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

Source file

npm/astro/CVE-2026-50146.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:40 +0000.