All vulnerabilities

Servers and applications

GHSA-p965-6jxv-r66x

Cross-site scripting via spread attributes in the Svelte client runtime

Severity
Low
Published
25 Nov 2026
Last changed
25 Nov 2026
Added to UpHeron
25 Nov 2026
Fixed in
5.59.2
Weakness
Cross-site scripting (CWE-79)
Sources
Project advisories (GitHub)

Description

When using spread syntax to render attributes from untrusted data, event handler properties whose names use non-lowercase casing are written to the element as attributes by the client runtime when the component mounts or hydrates. If an application spreads user-controlled or external data as element attributes, an attacker who can control the keys of that data can inject event handlers that execute in victims' browsers. Server-rendered HTML is not affected; the handler is added in the browser.

This is similar to but different from CVE-2026-27121 and CVE-2026-42599.

This is fixed in [email protected]. Applications that cannot upgrade should avoid spreading objects with untrusted keys onto elements, or only pass through an allowlist of known attribute names.

From sveltejs/svelte's security advisory.

Affected software

SoftwareAffected versions
SvelteServers and applications · github:sveltejs/svelte
  • Every version before 5.59.2

About Svelte

JavaScript framework

From Wikidata, CC0 1.0.
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

ReleaseLatestSecurity fixes
55.59.1Yes
44.2.20Ended 19 Oct 2024
33.59.2Ended 22 Jun 2023
22.16.1Ended 21 Apr 2019
11.64.1Ended 19 Apr 2018

From endoflife.date.

References