Skip to content

CVE-2024-45047 Potential mXSS vulnerability due to improper HTML escaping in svelte

MediumCVSS 6.1 EPSS 0.37%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

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.

Upgrade path

3 packages: 2 fixed.

PackageAffectedFixed inStatus
npm svelte(npm) < 4.2.19 4.2.19 Fixed
svelte < 4.2.19 4.2.19 Fixed
sveltejs svelte = < 4.2.19 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
npm svelte(npm) < 4.2.19 4.2.19
sveltejs svelte = < 4.2.19 No fix listed
svelte < 4.2.19 4.2.19

References