Packages / svelte / Security

ModerateVulnerabilityGHSA-f3cj-j4f6-wq85Published 14 May 2026

Svelte: SSR XSS via Insecure Promise Serialization in hydratable

Affected releases · svelte

  • 5.x5.46.0 – 5.55.6Fixed in 5.55.7

On 5.x, the newest line:

npm install svelte@5.55.7
  1. Not affected

    0.0.1 – 5.45.10

    701 releases

  2. Affected

    5.46.0 – 5.55.6

    49 releases

  3. Fixed

    5.55.7 – 5.57.2

    18 releases, latest

768 stable releases of svelte, oldest to newest.

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

Contents of hydratable promises were not properly stringified, potentially leading to an XSS exploit. You are vulnerable if all of the following is true:

  • you are using hydratable (an experimental feature at the time of this report)

  • you are passing attacker-controlled input such that a synchronous value is hydrated, then a promise value, e.g. hydratable('someKey', () => [synchronousValue, promiseValue])