All reports
Medium

Svelte: SSR XSS via Insecure Promise Serialization in hydratable

Affected versions

Affected versions
>= 5.46.0, <= 5.55.6
Fixed version
5.55.7

Description

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])

Links

Credits

  • dummdidumm
  • elliott-with-the-longest-name-on-github