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.
Published: 2026-06-22
Score: 7.1 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Mon, 22 Jun 2026 18:45:00 +0000

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-22T17:31:56.313Z

Reserved: 2026-06-03T18:49:32.276Z

Link: CVE-2026-50146

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-22T19:30:06Z

Weaknesses
  • CWE-80

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