CVE-2026-50146

Astro: Reflected XSS via unescaped slot name

Published Jun 22, 2026 CVSS 3.1 · 7.1 High EPSS < 1% KEV · Not listed
Description
Astro is a web framework. Prior to 6.3.3, 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 vulnerability is fixed in 6.3.3.

Analysis

AI-generated

Technical impact

Astro, a web framework, has a flaw where unescaped slot names are inserted into a data-astro-template attribute when a component uses a client:* directive. The lack of HTML escaping allows an attacker to inject arbitrary markup or script that executes during server‑side rendering, resulting in a reflected cross‑site scripting vulnerability. This flaw maps to CWE‑80 and can compromise the confidentiality, integrity, and availability of the rendered page. The effect is not limited to a single user; any visitor to a page that renders a malicious slot name would be impacted.

Affected Systems

Any installation of Astro by withastro:astro that is running a version earlier than 6.3.3 is vulnerable. The issue existed in all releases before that patch, regardless of operating system or deployment method, because it is a framework‑level bug affecting the rendering engine. Even projects that rely on components with client:* directives are at risk.

Risk and Exploitability

The CVSS base score of 7.1 classifies this as high severity. Because the vulnerability is reflected and does not require privileged access or initial compromise, an attacker could exploit it simply by controlling the slot name sent to the template. The EPSS score is currently unavailable, and the vulnerability is not yet listed in the CISA KEV catalog, but anyone with the ability to influence slot names—such as by entering data into a user‑controllable field—can trigger the error. The risk is elevated in environments that expose the rendering process to external input or that rely heavily on client‑side directives.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Astro to version 6.3.3 or later.
  • If an upgrade is not immediately possible, ensure that components using the client:* directive do not accept untrusted slot names or escape them before rendering.
  • Review existing templates for any use of dynamic slot names and refactor them to prevent XSS injection.

Generated by OpenCVE AI on June 22, 2026 at 19:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-8hv8-536x-4wqp Astro: Reflected XSS via unescaped slot name
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Withastro
Withastro astro
Vendors & Products Withastro
Withastro astro
Type Values Removed Values Added
Description Astro is a web framework. Prior to 6.3.3, 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 vulnerability is fixed in 6.3.3.
Title Astro: Reflected XSS via unescaped slot name
Weaknesses CWE-80
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N'}

Weaknesses
  • CWE-80

    Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 23, 2026, 2:11 PM
Reserved
Jun 3, 2026, 6:49 PM
Status
Modified
Published
Jun 22, 2026, 7:17 PM
Modified
Oct 25, 2026, 11:10 PM