Servers and applications
GHSA-6mgr-mcq2-29qx
Unbounded allocation in array destructuring of array-like values
- Severity
- Medium
- Published
- 25 Nov 2026
- Last changed
- 25 Nov 2026
- Added to UpHeron
- 25 Nov 2026
- Fixed in
- 5.59.2
- Sources
- Project advisories (GitHub)
Description
When a $state or $derived declaration uses array destructuring without a rest element (for example let [first] = $derived(value)), Svelte converts the value to an array with an internal helper. If the value was a non-iterable array-like object, the helper ignored the number of elements the pattern needs and copied every element up to the object's length. During server-side rendering, an array-like value with a very large length could make the render block the event loop and exhaust memory, crashing the server process.
You are only affected if your application passes untrusted data that is not validated to be a real array (for example, parsed JSON objects) into array destructuring in a $state or $derived declaration. If such values are always arrays or other iterables, you are not affected.
This is fixed in 5.59.2. If you cannot upgrade, validate that untrusted values are arrays (for example with Array.isArray) before destructuring them.
Affected software
| Software | Affected versions |
|---|---|
SvelteServers and applications · github:sveltejs/svelte |
|
About Svelte
JavaScript framework
- Share of all websites
- 0.1%W3Techs, Nov 2026
- Developers who used it in the past year
- 7.2%Stack Overflow Developer Survey 2025, 2025
- Weekly downloads (npm)
- 10,382,657npm, 22 Nov 2026
- GitHub stars
- 89,867GitHub, 22 Nov 2026
- Forks
- 6,131GitHub, 22 Nov 2026
- Latest release
- [email protected]GitHub, 22 Nov 2026
- Released
- 20 Nov 2026GitHub
- Developer
- Rich HarrisWikidata
- License
- MIT LicenseWikidata
- Written in
- JavaScriptWikidata
- First released
- 26 Nov 2016Wikidata
- First published on GitHub
- 20 Nov 2016GitHub
Release lines
| Release | Latest | Security fixes |
|---|---|---|
| 5 | 5.59.1 | Yes |
| 4 | 4.2.20 | Ended 19 Oct 2024 |
| 3 | 3.59.2 | Ended 22 Jun 2023 |
| 2 | 2.16.1 | Ended 21 Apr 2019 |
| 1 | 1.64.1 | Ended 19 Apr 2018 |
From endoflife.date.
Vulnerabilities in Svelte
- In our list
- 12
- Published in the last 12 months
- 11
- Critical, last 12 months
- 0
- High, last 12 months
- 1
- Known exploited
- 0
- GHSA-p965-6jxv-r66xCross-site scripting via spread attributes in the Svelte client runtimeLow 25 Nov 2026
- CVE-2026-42573XSS via DOM Clobbering of Internal Framework StateMedium 5.3 14 May 2026
- CVE-2026-42599Cross-site scripting via spread attributes in Svelte SSRMedium 5.1 14 May 2026
- CVE-2026-27901XSS during SSR with contenteditable `bind:innerText` and `bind:textContent`Medium 5.3 25 Feb 2026
- CVE-2026-27119XSS in SSR `<option>` elementMedium 5.1 18 Feb 2026
- CVE-2026-27121Cross-site scripting via spread attributes in Svelte SSRMedium 5.1 18 Feb 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-6mgr-mcq2-29qx
- github.com https://github.com/sveltejs/svelte/security/advisories/GHSA-6mgr-mcq2-29qx