CVE-2024-45047
MEDIUM 6.1CVSS 3.1Svelte has a potential mXSS vulnerability due to improper HTML escaping
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.
- Published
- 30 Aug 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-79
- Also known as
- GHSA-8266-84wp-wv5c
- Sources
- NVDJSONOSV GHSA-8266-84wp-wv5cJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | svelte | sveltecpe:2.3:a:svelte:svelte:*:*:*:*:*:node.js:*:* |
< 4.2.19 | 4.2.19 |
| OSV | npm | svelte | < 4.2.19 | 4.2.19 |
References
- https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-45047 · ADVISORY
- https://github.com/sveltejs/svelte/commit/83e96e044deb5ecbae2af361ae9e31d3e1ac43a3 · WEB
- https://github.com/sveltejs/svelte · PACKAGE
History
- 25 Nov 2026 20:56 UTC · NVD: first stored (published 30 Aug 2024)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 30 Aug 2024)