# Svelte XSS via insecure promise serialization in hydratable

Source: https://junglewise.ai/threats/svelte-xss-via-insecure-promise-serialization-in-hydratable-3f504409  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-14. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

Severity: medium · CVSS 4 · Published 2026-05-14

Svelte is a popular JavaScript framework used to build web applications. The hydratable feature (used to enable server-side rendering with client-side interactivity) fails to properly sanitize promise-based content, allowing an attacker who can control input to inject malicious scripts into rendered pages. This could lead to theft of user session data, credentials, or other sensitive information displayed in the browser.

Technologies: [svelte (npm)](https://junglewise.ai/threats/technologies/svelte). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** Medium severity, with a CVSS score of 4, published 14 May 2026.

**Which products and versions are affected?** svelte (npm) SEMVER:introduced=5.46.0,fixed=5.55.7.

**Is there a fix for This vulnerability?** Yes. svelte (npm): upgrade to 5.55.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run svelte (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- svelte (npm): upgrade to 5.55.7 or later

  ```sh
  npm install svelte@5.55.7
  ```


## Technical details

This is a cross-site scripting (XSS) vulnerability in Svelte's hydratable function, which is used for server-side rendering (SSR) hydration. The vulnerability arises from improper stringification of promise contents, allowing attackers to inject arbitrary HTML/JavaScript when both synchronous and promise-based values are passed to the hydratable function with attacker-controlled input. The attack requires the application to use the experimental hydratable feature and pass attacker-controlled data that triggers hydration of a promise value. The vulnerability affects Svelte versions 5.46.0 through 5.55.6 and was patched in version 5.55.7.

## Affected products

- Svelte Svelte 5.46.0 to 5.55.6

## Timeline

- 2026-05-14: disclosed
- 2026-05-14: patched: Fixed in version 5.55.7

## References

- [https://github.com/sveltejs/svelte/security/advisories/GHSA-f3cj-j4f6-wq85](https://github.com/sveltejs/svelte/security/advisories/GHSA-f3cj-j4f6-wq85)
- [https://github.com/sveltejs/svelte/commit/a16ebc67bbcf8f708360195687e1b2719463e1a4](https://github.com/sveltejs/svelte/commit/a16ebc67bbcf8f708360195687e1b2719463e1a4)

## Related threats

- [Svelte XSS via spread attributes in SSR](https://junglewise.ai/threats/cve-2026-42599-svelte-xss-via-spread-attributes-in-ssr)
- [Svelte DOM clobbering leading to XSS in internal framework state](https://junglewise.ai/threats/cve-2026-42573-svelte-dom-clobbering-leading-to-xss-in-internal-framework-state)
- [Svelte ReDoS in svelte:element tag validation](https://junglewise.ai/threats/cve-2026-42567-svelte-redos-in-svelte-element-tag-validation)
- [Svelte XSS via HTML comment injection in SSR error boundary](https://junglewise.ai/threats/cve-2026-27902-svelte-xss-via-html-comment-injection-in-ssr-error-boundary)
- [Svelte XSS in SSR with contenteditable bind:innerText and bind:textContent](https://junglewise.ai/threats/cve-2026-27901-svelte-xss-in-ssr-with-contenteditable-bind-innertext-and-bind)
