Advisory

GHSA-gw32-9rmw-qwww

Also known as: None

Summary

svelte is vulnerable to XSS with textarea bind:value

Details

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

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-01-16 21:02 UTC
Modified
2026-02-03 03:17 UTC

Affected packages and fixes

svelte

npm · All systems

Affected

  • introduced 3.0.0, fixed 3.59.2 (semver)

Fixed versions

3.59.2

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences