HighGHSA-gw32-9rmw-qwww
svelte is vulnerable to XSS with textarea bind:value
Published 16 Jan 2026 · Updated 3 Feb 2026
Affected package
sveltenpm
- Affected
- >=3.0.0 <3.59.2
- Fixed in
- 3.59.2
Update to the fixed version for your release line, for example:
npm install svelte@3.59.2Details
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
Is GHSA-gw32-9rmw-qwww 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.