# GHSA-f3cj-j4f6-wq85: Svelte: SSR XSS via Insecure Promise Serialization in hydratable

> An XSS vulnerability in Svelte's experimental hydratable feature allows attackers to execute scripts if attacker-controlled input is passed to promise serialization.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 14 May 2026

## What is GHSA-f3cj-j4f6-wq85?

GHSA-f3cj-j4f6-wq85 is a cross-site scripting vulnerability in svelte, published on 14 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official 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])`

## Which versions are affected by GHSA-f3cj-j4f6-wq85?

2 open source packages ship an affected version, including svelte.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `svelte` | npm | From 5.46.0 | 5.55.7 |
| `svelte` | npm | From 5.46.0 | 5.55.7 |

## How do I fix GHSA-f3cj-j4f6-wq85?

Upgrade svelte to 5.55.7 or later.

## Is GHSA-f3cj-j4f6-wq85 being exploited?

There is no known exploitation of GHSA-f3cj-j4f6-wq85 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-f3cj-j4f6-wq85 and fix it if it is affected.

What it is: GHSA-f3cj-j4f6-wq85 is a cross-site scripting vulnerability in svelte, published on 14 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-f3cj-j4f6-wq85 in the wild and no public exploit code.

Affected packages and fixed versions:
- svelte (npm): affected from 5.46.0; fixed in 5.55.7
- svelte (npm): affected from 5.46.0; fixed in 5.55.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-f3cj-j4f6-wq85/ (Markdown: https://insights.sbomify.com/GHSA-f3cj-j4f6-wq85/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-f3cj-j4f6-wq85

---
From sbomify Insights: https://insights.sbomify.com/GHSA-f3cj-j4f6-wq85/
Summaries are generated and may contain mistakes; the official description above is the record.
