Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. svelte
  4. ›
  5. CVE-2026-42599

CVE-2026-42599: Svelte SSR vulnerable to cross-site scripting via spread attributes

May 14, 2026 (updated June 9, 2026)

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 is similar to but different from CVE-2026-27121.

References

  • github.com/advisories/GHSA-pr6f-5x2q-rwfp
  • github.com/sveltejs/svelte/releases/tag/svelte%405.55.7
  • github.com/sveltejs/svelte/security/advisories/GHSA-pr6f-5x2q-rwfp
  • nvd.nist.gov/vuln/detail/CVE-2026-27121
  • nvd.nist.gov/vuln/detail/CVE-2026-42599

Code Behaviors & Features

Detect and mitigate CVE-2026-42599 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 5.55.7

Fixed versions

  • 5.55.7

Solution

Upgrade to version 5.55.7 or above.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/svelte/CVE-2026-42599.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:52 +0000.