GHSA-gw32-9rmw-qwww
high
svelte is vulnerable to XSS with textarea bind:value
- Severity
- high CVSS:4.0 by GitHub
- Published
- Last changed
Description
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
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| svelte (npm) | from 3.0.0 before 3.59.2 | GitHub Advisory Database |
Classification
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-gw32-9rmw-qwww changed 2026-02-03 | CC-BY-4.0 |