Svelte SSR attribute spreading includes inherited properties from prototype chain
Published 19 Feb 2026 · Updated 10 Sept 2026
Affected package
- Affected
- <5.51.5
- Fixed in
- 5.51.5
npm install svelte@5.51.5Details
In server-side rendering, attribute spreading on elements (e.g. <div {...attrs}>) enumerates inherited properties from the object's prototype chain rather than only own properties. In environments where Object.prototype has already been polluted — a precondition outside of Svelte's control — this can cause unexpected attributes to appear in SSR output or cause SSR to throw errors. Client-side rendering is not affected.
Is GHSA-crpf-4hrx-3jrp 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.