# CVE-2026-126362: Astro @astrojs/svelte renderer HTML injection via unescaped slot names

Source: https://junglewise.ai/threats/cve-2026-126362-astro-reflected-xss-via-unescaped-slot-names-in-astrojs-svelte  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-13. Updated: 2026-11-13  
License: CC BY 4.0 with a link back

CVE-2026-126362 · Severity: medium · CVSS 4 · Published 2026-11-13

Astro is a web framework that builds content-driven websites, including blog platforms and documentation sites. A flaw in the Svelte component renderer could allow attackers to inject malicious HTML code through crafted slot names, potentially compromising web pages viewed by users. Exploitation requires a hydrated Svelte component with dynamic slot rendering controlled by an attacker.

Vendors: [Astro](https://junglewise.ai/threats/vendors/astro), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-126362 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-126362 being exploited in the wild.

**How severe is CVE-2026-126362?** Medium severity, with a CVSS score of 4, published 13 November 2026.

**Which products and versions are affected?** Astro @Astrojs/Svelte 5.7.3 through 9.1.1; @astrojs/svelte (npm) >= 5.7.3, <= 9.1.1, SEMVER:introduced=5.7.3,fixed=9.1.2.

**Is there a fix for CVE-2026-126362?** Yes. @astrojs/svelte (npm): upgrade to 9.1.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-126362 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-126362?** Check whether you run Astro @Astrojs/Svelte or @astrojs/svelte (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @astrojs/svelte (npm): upgrade to 9.1.2 or later

  ```sh
  npm install @astrojs/svelte@9.1.2
  ```


## Technical details

The @astrojs/svelte renderer failed to HTML-escape slot names when inserting them into the name attribute of astro-slot wrapper elements, allowing attribute termination and active HTML injection. Attack requires a hydrated Svelte component using a client:* directive with dynamic slot name rendering; components that did not render the attacker-chosen slot only emitted Astro's escaped fallback content. Both server-side and client-side hydration paths were vulnerable.

## Affected products

- Astro @astrojs/svelte 5.7.3 through 9.1.1

## Identifiers

- CVE-2026-126362
- GHSA-f4j9-crrj-867q

## Timeline

- 2026-11-13: disclosed
- 2026-10-28: patched: Fix released as version 9.1.2

## References

- [https://github.com/withastro/astro/commit/5e476365378e41aa2745d003b2383d02008d7b44](https://github.com/withastro/astro/commit/5e476365378e41aa2745d003b2383d02008d7b44)
- [https://github.com/withastro/astro/releases/tag/@astrojs/svelte@9.1.2](https://github.com/withastro/astro/releases/tag/@astrojs/svelte@9.1.2)
