CVE-2026-42573: Svelte: XSS via DOM Clobbering of Internal Framework State
Svelte is a performance oriented web framework. Prior to version 5.55.7, Svelte was vulnerable to DOM clobbering of its internal framework state on elements, potentially leading to XSS attacks. This issue has been patched in version 5.55.7.
Other sources
Svelte was vulnerable to DOM clobbering of its internal framework state on elements, potentially leading to XSS attacks.
You are vulnerable if all of the following is true: - you are using attribute spreading on a form element - you are using attribute spreading or allow a dynamic value for the name attribute on an input or button element within that form - both of these are simultaneously user-controllable
svelte <form {...spread1}> <input {...spread2}> </form>
— GitHub
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/svelteto a version that resolves this vulnerability.Fixed in 5.55.7 - Upgrade
Upgrade
Svelteto a version that resolves this vulnerability.Fixed in 5.55.7
Event History
Frequently Asked Questions
What is the severity of CVE-2026-42573?
CVE-2026-42573 has a moderate severity rating due to its potential to lead to XSS attacks.
How do I fix CVE-2026-42573?
To fix CVE-2026-42573, upgrade to Svelte version 5.55.7 or later.
What are the conditions that make me vulnerable to CVE-2026-42573?
You are vulnerable to CVE-2026-42573 if you are using attribute spreading on a form element and allow a dynamic value for certain attributes.
What type of attack can CVE-2026-42573 lead to?
CVE-2026-42573 can lead to Cross-Site Scripting (XSS) attacks due to DOM clobbering.
What software versions are affected by CVE-2026-42573?
Versions of Svelte up to 5.55.6 are affected by CVE-2026-42573.