GHSA-f3cj-j4f6-wq85: Svelte Cross-Site Scripting Vulnerability
MODERATEGHSA-f3cj-j4f6-wq85 is a MODERATE cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Svelte libraries in the npm ecosystem. The issue involves ssr xss via insecure promise serialization in hydratable. Remediation is available by upgrading affected packages to version 5.55.7.
GHSA-f3cj-j4f6-wq85 at a Glance
How to Fix GHSA-f3cj-j4f6-wq85
To remediate this vulnerability, upgrade all affected Svelte dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install svelte@5.55.7
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls svelte
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-f3cj-j4f6-wq85, inspect your project dependencies using npm:
npm ls svelte
Analyze the terminal output to locate any version of Svelte in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.55.7), your application is affected.
Note: The npm ls svelte command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Svelte, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-f3cj-j4f6-wq85 Affected Svelte Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
svelte
|
npm |
≥ 5.46.0
< 5.55.7
|
5.55.7
|
References
Frequently Asked Questions
What is GHSA-f3cj-j4f6-wq85?
Which Svelte versions are affected?
What version fixes GHSA-f3cj-j4f6-wq85?
Is svelte affected?
What CWE is associated with GHSA-f3cj-j4f6-wq85?
How can I check npm dependencies for GHSA-f3cj-j4f6-wq85?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f3cj-j4f6-wq85",
"modified" : "2026-05-14T20:30:09Z",
"published" : "2026-05-14T20:30:09Z",
"aliases" : [ ],
"summary" : "Svelte: SSR XSS via Insecure Promise Serialization in hydratable",
"details" : "Contents of `hydratable` promises were not properly stringified, potentially leading to an XSS exploit. You are vulnerable if all of the following is true:\n- you are using `hydratable` (an experimental feature at the time of this report)\n- you are passing attacker-controlled input such that a synchronous value is hydrated, then a promise value, e.g. `hydratable('someKey', () => [synchronousValue, promiseValue])`",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "svelte"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.46.0"
}, {
"fixed" : "5.55.7"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 5.55.6"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sveltejs/svelte/security/advisories/GHSA-f3cj-j4f6-wq85"
}, {
"type" : "WEB",
"url" : "https://github.com/sveltejs/svelte/commit/a16ebc67bbcf8f708360195687e1b2719463e1a4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sveltejs/svelte"
}, {
"type" : "WEB",
"url" : "http://github.com/sveltejs/svelte/releases/tag/svelte%405.55.7"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-14T20:30:09Z",
"nvd_published_at" : null
}
}