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.
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).
GHSA-gw32-9rmw-qwww Severity
GHSA-gw32-9rmw-qwww is rated high severity.
High — serious impact or readily exploitable. Prioritize remediation.
How to Reproduce GHSA-gw32-9rmw-qwww
pruva-verify REPRO-2026-00067 curl -O https://pruva.dev/api/v1/reproductions/REPRO-2026-00067/artifacts/reproduction_steps.sh && chmod +x reproduction_steps.sh && ./reproduction_steps.sh 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
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:
svelteSSR renderer for<textarea bind:value> - Affected versions:
>= 3.0.0and< 3.59.2(verified on3.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
- Execute
repro/reproduction_steps.sh. - 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. - Reproduction succeeds when the script exits
0after detecting the injected</textarea><script>alert('BIM');</script>sequence inlogs/ssr-output.html; exit1means 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.htmlcontains<textarea>test'"></textarea><script>alert('BIM');</script></textarea>, proving that hostile script tags are emitted unescaped. - Install log:
logs/npm-install.logdocuments dependency installation for auditability.
Recommendations / Next Steps
- Upgrade Svelte to version
3.59.2or 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.shwas 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.
Unknown error
pwd/root/.pruva/runs/ghsa-gw32-9rmw-qwww_20260117-145217
Artifacts and Evidence for GHSA-gw32-9rmw-qwww
Scripts, logs, diffs, and output captured during the reproduction.
No artifacts available
How to Fix GHSA-gw32-9rmw-qwww
FAQ: GHSA-gw32-9rmw-qwww
How does the Svelte textarea SSR XSS exploit work?
</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?
How can I reproduce the Svelte textarea SSR XSS?
<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.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.