CVE-2026-126362 Astro: Reflected XSS via unescaped slot names in @astrojs/svelte

Low 2.3 Published Updated

Attackers can inject HTML via unescaped slot names in Astro Svelte components that render attacker-chosen slots; Astro site developers should care.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Harmful if only installed
No
Needs a specific call
Yes
Fix
Available

What is CVE-2026-126362?

CVE-2026-126362 is a low-severity cross-site scripting vulnerability in withastro astro, published on 12 Nov 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Astro is a web framework for content-driven websites. From 5.7.3 until 9.1.2, the @astrojs/svelte renderer inserted a named slot into the quoted name attribute of an astro-slot wrapper without HTML escaping. Request-controlled slot names containing a quote could terminate the attribute and inject active HTML. Exploitation required a hydrated Svelte component using a client:* directive and dynamic rendering of the attacker-chosen slot; components that did not render that slot emitted only Astro's escaped fallback content. Both server rendering and client-side hydration used the unsafe slot name. This issue is fixed in version 9.1.2.

Weakness: CWE-79

Which versions are affected by CVE-2026-126362?

1 open source package ship an affected version, including @astrojs/svelte.

An affected version is only exploitable if your software uses the vulnerable function or option. Many projects that include it are not exposed.

PackageAffectedFixed in
@astrojs/svelte npmFrom 5.7.39.1.2

How do I fix CVE-2026-126362?

Upgrade @astrojs/svelte to 9.1.2 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-126362 being exploited?

There is no known exploitation of CVE-2026-126362 in the wild and no public exploit code.

Sources

Also known as GHSA-f4j9-crrj-867q.

Is CVE-2026-126362 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free