ModerateVulnerabilityGHSA-m56q-vw4c-c2cpCVE-2026-27122Published 19 Feb 2026
Svelte SSR does not validate dynamic element tag names in `<svelte:element>`
Affected releases · svelte
- 5.x5.0.0 – 5.51.4Fixed in 5.51.5
- 4.x and older0.0.1 – 4.2.20No fix, no longer updated
On 5.x, the newest line:
npm install svelte@5.51.55.x
Affected
5.0.0 – 5.51.4
300 releases
Fixed
5.51.5 – 5.57.2
43 releases, latest
4.x
Affected
4.0.0 – 4.2.20
30 releases
3.x
Affected
3.0.0 – 3.59.2
152 releases
2.x
Affected
2.0.0 – 2.16.1
57 releases
1.x
Affected
1.0.0 – 1.64.1
178 releases
0.x
Affected
0.0.1 – 0.3.0
8 releases
Is your project affected?
Paste your package.json, or type the range you declare for svelte. It is read in your browser and sent nowhere.
What happens
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.