MediumGHSA-m56q-vw4c-c2cpCVE-2026-27122
Svelte SSR does not validate dynamic element tag names in `<svelte:element>`
Published 19 Feb 2026 · Updated 10 Sept 2026
Affected package
sveltenpm
- 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.5Details
When using <svelte:element this={tag}> in server-side rendering, the provided tag name is not validated or sanitized before being emitted into the HTML output. If the tag string contains unexpected characters, it can result in HTML injection in the SSR output. Client-side rendering is not affected.
Is GHSA-m56q-vw4c-c2cp 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.