GHSA-f3cj-j4f6-wq85: Svelte Cross-Site Scripting Vulnerability

MODERATE
CWE-79
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-f3cj-j4f6-wq85
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Svelte
Package Ecosystem npm
Published Date
Last Updated

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.

svelte fixed: 5.55.7
npm install svelte@5.55.7
Verify Direct and Transitive Dependencies

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

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

GHSA-f3cj-j4f6-wq85 Affected Svelte Versions

1 component(s)
Fixed Versions:
5.55.7
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?
GHSA-f3cj-j4f6-wq85 is a security vulnerability in Svelte involving SSR XSS via Insecure Promise Serialization in hydratable under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Svelte versions are affected?
Affected versions include releases prior to 5.55.7 across affected packages: svelte.
What version fixes GHSA-f3cj-j4f6-wq85?
Upgrading to 5.55.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is svelte affected?
Yes, svelte is affected in releases prior to 5.55.7. Upgrade your dependency to 5.55.7 or later.
What CWE is associated with GHSA-f3cj-j4f6-wq85?
GHSA-f3cj-j4f6-wq85 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for GHSA-f3cj-j4f6-wq85?
Run the dependency tree command: 'npm ls svelte'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}