MediumGHSA-pr6f-5x2q-rwfpCVE-2026-42599

Svelte SSR vulnerable to cross-site scripting via spread attributes

Published 14 May 2026 · Updated 9 Jun 2026

Affected package

Affected
<5.55.7
Fixed in
5.55.7
Update to the fixed version for your release line, for example:npm install svelte@5.55.7

Details

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.

Is GHSA-pr6f-5x2q-rwfp in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected svelte, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.