GHSA-GW32-9RMW-QWWW

Vulnerability from github – Published: 2026-01-16 21:02 – Updated: 2026-01-16 21:02
VLAI?
Summary
svelte is vulnerable to XSS with textarea bind:value
Details

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
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "svelte"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.0.0"
            },
            {
              "fixed": "3.59.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-01-16T21:02:56Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\n\nA server-side rendered `\u003ctextarea\u003e` with two-way bound value does not have its value correctly escaped in the rendered HTML.\n\n### Details\n\nIn SSR, `\u003ctextarea bind:value={...}\u003e` does not have its value escaped when it is rendered into the HTML as `\u003ctextarea\u003e...\u003c/textarea\u003e`.\n\n### PoC\n\nPut this in a server-side-rendered Svelte component:\n\n```\n\u003cscript\u003e\n  let value = `test\u0027\"\u003e\u003c/textarea\u003e\u003cscript` + `\u003ealert(\u0027BIM\u0027);\u003c/sc` + `ript\u003e`;\n\u003c/script\u003e\n\n\u003ctextarea bind:value /\u003e\n```\n\n### Impact\n\n- Only affects SSR\n- Needs a `\u003ctextarea bind:value\u003e` filled by user content via two-way binding",
  "id": "GHSA-gw32-9rmw-qwww",
  "modified": "2026-01-16T21:02:56Z",
  "published": "2026-01-16T21:02:56Z",
  "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"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "svelte is vulnerable to XSS with textarea bind:value"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…