# CVE-2025-15265: Svelte cross-site scripting in hydratable keys

Source: https://junglewise.ai/threats/cve-2025-15265-svelte-cross-site-scripting-in-hydratable-keys  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-01-15. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2025-15265 · Severity: medium · CVSS 4 · Published 2026-01-15

Svelte is a popular JavaScript framework used to build web applications. A vulnerability in how it handles data keys when rendering pages on the server allows attackers to inject malicious code that runs in users' browsers, potentially stealing sessions, hijacking accounts, or performing unauthorized actions.

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

## Quick answers

**Is CVE-2025-15265 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-15265 being exploited in the wild.

**How severe is CVE-2025-15265?** Medium severity, with a CVSS score of 4, published 15 January 2026.

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

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

**How is CVE-2025-15265 attacked?** It is attacked over the network.

**Am I affected by CVE-2025-15265?** 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.46.4 or later

  ```sh
  npm install svelte@5.46.4
  ```


## Technical details

A cross-site scripting (XSS) vulnerability exists in Svelte 5.46.0 through 5.46.3 in the hydratable function, which is used for server-side rendering with client-side hydration. The vulnerability occurs because keys passed as the first argument to hydratable are embedded directly into a &lt;script&gt; block in the server-rendered HTML without proper escaping of unsafe characters. An attacker who can control the key parameter (by supplying untrusted user input) can break out of the script context and inject arbitrary JavaScript into the HTML response. This requires the experimental.async flag to be enabled and affects only applications that use hydratable with user-controlled keys. The vulnerability is remotely exploitable in a single HTTP request with no special privileges required, though passive user interaction (loading the page) is needed.

## Affected products

- Svelte Svelte 5.46.0 to 5.46.3

## Identifiers

- CVE-2025-15265
- GHSA-6738-r8g5-qwp3

## Timeline

- 2026-01-15: disclosed
- 2026-01-15: patched: Fixed in version 5.46.4

## References

- [https://github.com/sveltejs/svelte/security/advisories/GHSA-6738-r8g5-qwp3](https://github.com/sveltejs/svelte/security/advisories/GHSA-6738-r8g5-qwp3)

## 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 insecure promise serialization in hydratable](https://junglewise.ai/threats/svelte-xss-via-insecure-promise-serialization-in-hydratable-3f504409)
- [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)
