Live threats

All CVEs / Svelte

CVE-2024-45047Svelte

Medium 6.1 No auth needed

Priority
52
CVSS 3.1
6.1
EPSS
0.5%
probability of exploitation in 30 days · percentile 40
Auth required
No
Published
Aug 30, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-79
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Svelte.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm svelte < 4.2.19 4.2.19 npm install svelte@4.2.19

Per OSV / GitHub Advisories (GHSA-8266-84wp-wv5c). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
sveltesvelte< 4.2.19

Official sources

References

Links published by the sources. Open them with care.