What’s Vulnerable › Vulnerabilities
CVE-2024-45047: Potential mXSS vulnerability due to improper HTML escaping in svelte
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2024-08-30 · updated 2026-06-17
- Weakness: CWE-79
Description
svelte performance oriented web framework. A potential mXSS vulnerability exists in Svelte for versions up to but not including 4.2.19. Svelte improperly escapes HTML on server-side rendering. The assumption is that attributes will always stay as such, but in some situation the final DOM tree rendered on browsers is different from what Svelte expects on server-side rendering. This may be leveraged to perform XSS attacks, and a type of the XSS is known as mXSS (mutation XSS). More specifically, this can occur when injecting malicious content into an attribute within a `noscript` tag. This issue has been addressed in release version 4.2.19. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Affected products
- sveltejs svelte: before 4.2.19 — fixed in 4.2.19
How to fix
Upgrade to a fixed version: sveltejs svelte 4.2.19. Check the vendor advisory for mitigations.
References
Get alerted when CVE-2024-45047 or the next vulnerability affects your stack