MediumGHSA-wv8q-r932-8hc7CVE-2022-25875SNYK-JS-SVELTE-2931080
Svelte vulnerable to XSS when using objects during server-side rendering
Published 13 Jul 2022 · Updated 8 Jul 2026
Affected package
sveltenpm
- Affected
- <3.49.0
- Fixed in
- 3.49.0
Update to the fixed version for your release line, for example:
npm install svelte@3.49.0Details
The package svelte before 3.49.0 is vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.
Is GHSA-wv8q-r932-8hc7 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.