MediumGHSA-f7gr-6p89-r883CVE-2026-27121

Svelte affected by cross-site scripting via spread attributes in Svelte SSR

Published 19 Feb 2026 · Updated 10 Sept 2026

Affected package

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

Details

Versions of svelte prior to 5.51.5 are vulnerable to cross-site scripting (XSS) during server-side rendering. 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.

Is GHSA-f7gr-6p89-r883 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.