# GHSA-gw32-9rmw-qwww: svelte is vulnerable to XSS with textarea bind:value

> Server-side rendered Svelte components with two-way bound textarea values fail to escape content, allowing attackers to inject malicious scripts.

- **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:** 16 Jan 2026

## What is GHSA-gw32-9rmw-qwww?

GHSA-gw32-9rmw-qwww is a cross-site scripting vulnerability in svelte, published on 16 Jan 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

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

## Which versions are affected by GHSA-gw32-9rmw-qwww?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `svelte` | npm | From 3.0.0 | 3.59.2 |
| `svelte` | npm | From 3.0.0 | 3.59.2 |

## How do I fix GHSA-gw32-9rmw-qwww?

Upgrade svelte to 3.59.2 or later.

## Is GHSA-gw32-9rmw-qwww being exploited?

There is no known exploitation of GHSA-gw32-9rmw-qwww in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-gw32-9rmw-qwww and fix it if it is affected.

What it is: GHSA-gw32-9rmw-qwww is a cross-site scripting vulnerability in svelte, published on 16 Jan 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-gw32-9rmw-qwww in the wild and no public exploit code.

Affected packages and fixed versions:
- svelte (npm): affected from 3.0.0; fixed in 3.59.2
- svelte (npm): affected from 3.0.0; fixed in 3.59.2

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-gw32-9rmw-qwww/ (Markdown: https://insights.sbomify.com/GHSA-gw32-9rmw-qwww/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-gw32-9rmw-qwww

---
From sbomify Insights: https://insights.sbomify.com/GHSA-gw32-9rmw-qwww/
Summaries are generated and may contain mistakes; the official description above is the record.
