Read the docs

Astro: Reflected XSS via unescaped slot names in @astrojs/svelte

Priority LOW 12CWE-79Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
Present
Impact type
Cross-site scripting
Confidentiality · integrity · availability
Low · Low · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-79.

Summary

Astro and @astrojs/svelte from 5.7.3 before 9.1.2 are affected by reflected cross-site scripting (CWE-79). The @astrojs/svelte renderer inserted a named slot into a quoted attribute without escaping, so a request-controlled slot name containing a quote can inject active HTML. Exploitation needs a hydrated Svelte component with a client:* directive that renders the attacker-chosen slot dynamically; other slots emit only Astro's escaped fallback, and server rendering and hydration both use the unsafe name. The CVSS 4.0 base score is 2.3 (LOW), and the issue is not listed in CISA KEV.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00381 32nd percentileScored 2026-11-16
Fix Fixed astro (withastro): 9.1.2@astrojs/svelte (npm): 9.1.2

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
withastroastro5.7.3 to before 9.1.29.1.2Patch availableCNA
—@astrojs/svelte (npm)5.7.3 to before 9.1.29.1.2Patch availableGHSA-f4j9-crrj-867q
  • astro Vendorwithastro Affected 5.7.3 to before 9.1.2 Fixed in 9.1.2 Patch available CNA
  • @astrojs/svelte (npm) Vendor— Affected 5.7.3 to before 9.1.2 Fixed in 9.1.2 Patch available GHSA-f4j9-crrj-867q

Remediation

Update astro and @astrojs/svelte to version 9.1.2.

Written with Claude Haiku 5.5 from the sources below · 2026-11-13

  • Fix · CNA astro (withastro) Fixed in 9.1.2
  • Fix · GHSA-f4j9-crrj-867q @astrojs/svelte (npm) Fixed in 9.1.2 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from CVE-2026-126362
  2. 2026-11-12 Alias added: GHSA-f4j9-crrj-867q
  3. 2026-11-12 Fix available: npm/@astrojs/[email protected] · GHSA-f4j9-crrj-867q
  4. 2026-11-12 CVSS score added · GHSA-f4j9-crrj-867q
  5. 2026-11-12 Weakness changed · GHSA-f4j9-crrj-867q
  6. 2026-11-12 4 new references · GHSA-f4j9-crrj-867q
  7. 2026-11-13 CISA SSVC decision points changed

References

  • TI-2026-26147 Astro: Unauthenticated Path Override via `x-astro-path` / `x_astro_path` CVSS 3.1CRITICAL 9.1
  • TI-2026-42600 Astro 6.4.7 Authorization Bypass via Decode Iteration Limit and Rewrite Path Canonicalization Mismatch CVSS 3.1HIGH 8.2
  • TI-2024-37142 Server source code is exposed to the public if sourcemaps are enabled CVSS 4.0HIGH 7.8
  • TI-2025-35987 Astro Cloudflare adapter is vulnerable to Server-Side Request Forgery via /_image endpoint CVSS 3.1HIGH 7.2
  • TI-2025-34958 Unauthorized third-party images in Astro’s _image endpoint CVSS 4.0MEDIUM 6.9
  • TI-2026-51542 Astro: Unauthenticated path override in the @astrojs/vercel ISR function CVSS 3.1MEDIUM 6.5
See all 48 →

Sources