HighVulnerabilityGHSA-gw32-9rmw-qwwwPublished 16 Jan 2026
svelte is vulnerable to XSS with textarea bind:value
Affected releases · svelte
- 3.x3.0.0 – 3.59.1Fixed in 3.59.2
On 3.x, the newest line:
npm install svelte@3.59.25.x
Not affected
5.0.0 – 5.57.2
343 releases, latest
3.x
Affected
3.0.0 – 3.59.1
151 releases
Fixed
3.59.2
1 release
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
Summary
A server-side rendered <textarea> with two-way bound value does not have its value correctly escaped in the rendered HTML.
Details
In SSR, <textarea bind:value={...}> does not have its value escaped when it is rendered into the HTML as <textarea>...</textarea>.
PoC
Put this in a server-side-rendered Svelte component:
<script>
let value = `test'"></textarea><script` + `>alert('BIM');</sc` + `ript>`;
</script>
<textarea bind:value />Impact
Only affects SSR
Needs a
<textarea bind:value>filled by user content via two-way binding