GHSA-GW32-9RMW-QWWW
8.4
Svelte SSR XSS: The Textarea Trap
Alon Barad
Software EngineerJan 17, 2026·5 min read·3 visits
PoC Available
Executive Summary (TL;DR)
Svelte's SSR compiler forgot that `<textarea>` contents are children, not attributes. It didn't escape `bind:value` content during server-side rendering. Attackers can inject `</textarea>` to close the tag early and run scripts. Fixed in 3.59.2.
A high-severity Cross-Site Scripting (XSS) vulnerability exists in Svelte's Server-Side Rendering (SSR) compiler. Due to improper escaping of `bind:value` directives on `<textarea>` elements, attackers can break out of the HTML tag context and execute arbitrary JavaScript.
Official Patches
Fix Analysis (1)
Technical Appendix
CVSS Score
8.4/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:L/VA:N/SC:H/SI:H/SA:NAffected Systems
Svelte Framework (SSR Mode)SvelteKit applications using Svelte < 3.59.2
Affected Versions Detail
| Product | Affected Versions | Fixed Version |
|---|---|---|
svelte sveltejs | >= 3.0.0 < 3.59.2 | 3.59.2 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| CVSS Score | 8.4 (High) |
| Vector | 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 |
| Attack Vector | Network |
| Vulnerability Type | XSS (Cross-Site Scripting) |
| Affected Component | SSR Compiler (Textarea Handler) |
MITRE ATT&CK Mapping
CWE-79
Cross-site Scripting
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Known Exploits & Detection
Vulnerability Timeline
Fix committed to Svelte repository
2023-06-20
Advisory formally published
2026-01-16