GHSA-gw32-9rmw-qwww: Svelte Value Vulnerability

HIGH
CWE-79
Published
Advisory Summary

GHSA-gw32-9rmw-qwww is a HIGH value vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Svelte libraries in the npm ecosystem. The issue involves value. Remediation is available by upgrading affected packages to version 3.59.2.

GHSA-gw32-9rmw-qwww at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gw32-9rmw-qwww
Severity HIGH
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-gw32-9rmw-qwww

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: 3.59.2
npm install svelte@3.59.2
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-gw32-9rmw-qwww, 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 3.59.2), 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

### Summary A server-side rendered `<textarea>` with two-way bound value does not have its value correctly escaped in the rendered HTML. ### Details In SSR, `<textarea bind:value={...}>` does not have its value escaped when it is rendered into the HTML as `<textarea>...</textarea>`. ### PoC Put this in a server-side-rendered Svelte component: ``` <script> let value = `test'"></textarea><script` + `>alert('BIM');</sc` + `ript>`; </script> <textarea bind:value /> ``` ### Impact - Only affects SSR - Needs a `<textarea bind:value>` filled by user content via two-way binding

GHSA-gw32-9rmw-qwww Affected Svelte Versions

1 component(s)
Fixed Versions:
3.59.2
Product / Package Ecosystem Affected Versions Fixed Version
svelte
npm
≥ 3.0.0
< 3.59.2
3.59.2

References

Frequently Asked Questions

What is GHSA-gw32-9rmw-qwww?
GHSA-gw32-9rmw-qwww is a security vulnerability in Svelte involving value 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 3.59.2 across affected packages: svelte.
What version fixes GHSA-gw32-9rmw-qwww?
Upgrading to 3.59.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is svelte affected?
Yes, svelte is affected in releases prior to 3.59.2. Upgrade your dependency to 3.59.2 or later.
What CWE is associated with GHSA-gw32-9rmw-qwww?
GHSA-gw32-9rmw-qwww 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-gw32-9rmw-qwww?
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-gw32-9rmw-qwww",
  "modified" : "2026-01-16T21:02:56Z",
  "published" : "2026-01-16T21:02:56Z",
  "aliases" : [ ],
  "summary" : "svelte is vulnerable to XSS with textarea bind:value",
  "details" : "### Summary\n\nA server-side rendered `<textarea>` with two-way bound value does not have its value correctly escaped in the rendered HTML.\n\n### Details\n\nIn SSR, `<textarea bind:value={...}>` does not have its value escaped when it is rendered into the HTML as `<textarea>...</textarea>`.\n\n### PoC\n\nPut this in a server-side-rendered Svelte component:\n\n```\n<script>\n  let value = `test'\"></textarea><script` + `>alert('BIM');</sc` + `ript>`;\n</script>\n\n<textarea bind:value />\n```\n\n### Impact\n\n- Only affects SSR\n- Needs a `<textarea bind:value>` filled by user content via two-way binding",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:L/VA:N/SC:H/SI:H/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "svelte"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.59.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/svelte/security/advisories/GHSA-gw32-9rmw-qwww"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sveltejs/svelte/commit/a31dec5eb30978cff7ff4d77f4bf316841f711bc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sveltejs/svelte"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-16T21:02:56Z",
    "nvd_published_at" : null
  }
}