Skip to content

GHSA-gw32-9rmw-qwww: Verified Repro With Script Download

GHSA-gw32-9rmw-qwww: Svelte XSS via textarea bind:value in SSR

GHSA-gw32-9rmw-qwww is verified against svelte · npm. Vulnerability class: XSS. This high reproduction includes runnable sandbox proof, artifacts, and a plain-text agent view under REPRO-2026-00067.

REPRO-2026-00067 svelte · npm XSS Jan 17, 2026 .txt
Severity
HIGH
Reproduced in
8m 49s
Tool calls
104
Spend
$1.07
01 · Overview

What Is GHSA-gw32-9rmw-qwww?

GHSA-gw32-9rmw-qwww is a high-severity cross-site scripting (XSS) vulnerability in Svelte's server-side rendering of <textarea bind:value>, where the bound value is emitted without HTML-escaping. Pruva reproduced it (reproduction REPRO-2026-00067).

02 · Severity & CVSS

GHSA-gw32-9rmw-qwww Severity

GHSA-gw32-9rmw-qwww is rated high severity.

HIGH threat level

High — serious impact or readily exploitable. Prioritize remediation.

How to Reproduce GHSA-gw32-9rmw-qwww

$ pruva-verify REPRO-2026-00067
or curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00067/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh
Run in a VM or disposable container. This exploits a real vulnerability.
06 · Proof of Reproduction

Proof of Reproduction for GHSA-gw32-9rmw-qwww

Reproduced by Pruva's autonomous agents — 104 tool calls over 9 min. Full root-cause analysis and the complete transcript are below.

How the agent worked 318 events · 104 tool calls · 9 min
9 minDuration
104Tool calls
105Reasoning steps
318Events
1Dead-ends
Agent activity over 9 min
Support
10
Repro
304
0:0008:49

Root Cause and Exploit Chain for GHSA-gw32-9rmw-qwww

Summary

Server-side rendering of <textarea bind:value> in vulnerable versions of Svelte emits the bound value without HTML-escaping, so attacker-controlled content can prematurely close the <textarea> element and inject arbitrary markup or JavaScript into the SSR response, leading to reflected or stored XSS when delivered to a browser.

Impact

  • Component: svelte SSR renderer for <textarea bind:value>
  • Affected versions: >= 3.0.0 and < 3.59.2 (verified on 3.59.1)
  • Risk level: High – injected scripts execute in the victim’s browser, enabling credential/session theft, CSRF, or page defacement whenever SSR output includes untrusted textarea content.

Root Cause

During SSR the Svelte compiler concatenates the textarea’s bound value directly inside <textarea>...</textarea> without escaping special characters. Because <textarea> stores its value as innerHTML rather than an attribute, sequences such as </textarea><script> terminate the element and introduce attacker-supplied markup. The issue was fixed by commit a31dec5, which HTML-escapes textarea content before emission.

Reproduction Steps

  1. Execute repro/reproduction_steps.sh.
  2. The script bootstraps a clean project pinned to vulnerable svelte@3.59.1, writes a malicious textarea component, compiles it for SSR, and captures the output HTML.
  3. Reproduction succeeds when the script exits 0 after detecting the injected </textarea><script>alert('BIM');</script> sequence in logs/ssr-output.html; exit 1 means the payload was not observed.

Evidence

  • Run log: logs/reproduction.log – shows Node (v22.21.1) and npm (10.9.4) versions, dependency installation, SSR execution, and the final "VULNERABILITY REPRODUCED" message.
  • SSR output: logs/ssr-output.html contains <textarea>test'"></textarea><script>alert('BIM');</script></textarea>, proving that hostile script tags are emitted unescaped.
  • Install log: logs/npm-install.log documents dependency installation for auditability.

Recommendations / Next Steps

  • Upgrade Svelte to version 3.59.2 or later (or the latest 4.x release) where textarea values are escaped during SSR.
  • If upgrading is not immediately possible, manually escape user-controlled textarea values before SSR or avoid binding raw user data to <textarea> on the server.
  • Add regression tests that verify SSR output escapes textarea contents, including cases with </textarea> substrings and quotes.
  • Re-scan dependent applications for additional SSR contexts (e.g., <style>/<script> bindings) that may require escaping.

Additional Notes

  • Idempotency: repro/reproduction_steps.sh was executed multiple times back-to-back, each time yielding the same successful reproduction and clean logs, confirming idempotent behavior.
  • Limitations: The PoC targets SSR output only; client-side rendering escapes values correctly, so the vulnerability manifests when unescaped SSR HTML is sent to browsers before hydration.

GHSA-gw32-9rmw-qwww Reproduction Transcript

The agent's step-by-step process — every tool call, every handoff, the moment the exploit fired.

Full session Replay every step — scrub the timeline or play it back.

Event 1/40
0:000:53
0:00
session startedgpt-5.1-codex · ghsa-gw32-9rmw-qwww · ghsa-gw3
0:04
0:04
extract_facts
no facts extracted
0:06
0:06
extract_facts
no facts extracted
0:06
error

Unknown error

0:09
0:09
0:09
supportrepro
0:11
0:11
0:13
0:13
0:15
0:15
0:17
0:17
0:32
0:32
0:35
0:35
0:36
0:36
0:41
0:41
0:51
0:51
$pwd
/root/.pruva/runs/ghsa-gw32-9rmw-qwww_20260117-145217
0:53

Artifacts and Evidence for GHSA-gw32-9rmw-qwww

Scripts, logs, diffs, and output captured during the reproduction.

No artifacts available

08 · How to Fix

How to Fix GHSA-gw32-9rmw-qwww

Coming soon

Step-by-step mitigation and hardening guidance for GHSA-gw32-9rmw-qwww — configuration checks, workarounds where no patch exists, and how to verify you're protected — is on the way.

10 · FAQ

FAQ: GHSA-gw32-9rmw-qwww

How does the Svelte textarea SSR XSS exploit work?

An attacker supplies content containing a closing </textarea> tag followed by a <script> payload as the bound value. Since the SSR output does not HTML-escape textarea content, the injected markup terminates the textarea element early and the script tag is emitted verbatim into the HTML response, executing in the victim's browser when the page is delivered.

How severe is this Svelte textarea SSR XSS issue?

It is rated high severity: injected scripts execute in the victim's browser, enabling credential/session theft, CSRF, or page defacement whenever SSR output includes untrusted textarea content. It affects Svelte >= 3.0.0 and < 3.59.2 (verified on 3.59.1), and was fixed by commit a31dec5, which HTML-escapes textarea content before emission.

How can I reproduce the Svelte textarea SSR XSS?

Download the verified script from this page and run it in an isolated environment pinned to vulnerable svelte@3.59.1. It compiles a component with a bound <textarea> for SSR, sets its value to a payload containing </textarea><script>alert('BIM');</script>, and confirms the unescaped script sequence appears in the rendered SSR output.
11 · References

References for GHSA-gw32-9rmw-qwww

Authoritative sources for GHSA-gw32-9rmw-qwww — official vulnerability databases and the upstream advisory. Pruva's reproduction verifies the issue firsthand; these are the primary records to corroborate it.