{"id":"CVE-2024-45047","aliases":["CLSA-2026-1776040402","CLSA-2026-1776126838","CLSA-2026-1776213244","CLSA-2026-1776213252","EUVD-2024-2530","GHSA-8266-84wp-wv5c"],"status":"published","title":"Potential mXSS vulnerability due to improper HTML escaping in svelte","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.","severity":{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-11","score":0.00365,"percentile":0.30716,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2024-08-30T16:49:10Z","modified":"2026-10-28T02:30:33Z","fixes":[{"ecosystem":"npm","package":"svelte","fixed_in":["4.2.19"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"svelte","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.2.19"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"svelte","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.59.2-tuxcare.0"},{"fixed":"3.59.2-tuxcare.1"}]}],"versions":["3.59.2"],"bundled":5},{"source":"osv","ecosystem":"TuxCare:npm","package":"svelte","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.16.1-tuxcare.0"},{"fixed":"2.16.1-tuxcare.1"}]}],"versions":["2.16.1"],"bundled":6},{"source":"osv","ecosystem":"TuxCare:npm","package":"svelte","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"1.64.1-tuxcare.0"},{"fixed":"1.64.1-tuxcare.1"}]}],"versions":["1.64.1"],"bundled":6},{"source":"osv","ecosystem":"TuxCare:npm","package":"svelte","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.3.0-tuxcare.0"},{"fixed":"0.3.0-tuxcare.1"}]}],"versions":["0.3.0"],"bundled":6},{"source":"osv","ecosystem":"npm","package":"svelte","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"4.2.19"}]}]}],"products":[{"vendor":"svelte","product":"svelte"},{"vendor":"sveltejs","product":"svelte"}],"references":[{"url":"https://github.com/sveltejs/svelte/security/advisories/GHSA-8266-84wp-wv5c","tags":["x_refsource_CONFIRM","Exploit","Third Party Advisory","advisory","web"]},{"url":"https://github.com/sveltejs/svelte/commit/83e96e044deb5ecbae2af361ae9e31d3e1ac43a3","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-45047","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-8266-84wp-wv5c"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/45xxx/CVE-2024-45047.json","tags":["advisory"]},{"url":"https://github.com/sveltejs/svelte","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2024-45047","title":"Potential mXSS vulnerability due to improper HTML escaping in svelte","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.","status":"published","published":"2024-08-30T16:55:39.106Z","modified":"2024-08-30T18:11:07.734Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:34:07.831255Z"}],"euvd":[{"id":"EUVD-2024-2530","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.","status":"published","published":"2024-08-30T16:55:39Z","modified":"2024-08-30T18:11:07Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-03T00:56:06.59198Z"}],"ghsa":[{"id":"GHSA-8266-84wp-wv5c","title":"Svelte has a potential mXSS vulnerability due to improper HTML escaping","description":"### Summary\n\nA potential XSS vulnerability exists in Svelte for versions prior to 4.2.19.\n\n### Details\n\nSvelte improperly escapes HTML on server-side rendering. It converts strings according to the following rules:\n\n- If the string is an attribute value:\n    - `\"` -\u003e `\u0026quot;`\n    - `\u0026` -\u003e `\u0026amp;`\n    - Other characters -\u003e No conversion\n- Otherwise:\n    - `\u003c` -\u003e `\u0026lt;`\n    - `\u0026` -\u003e `\u0026amp;`\n    - Other characters -\u003e No conversion\n\nThe 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. More specifically, this can occur when injecting malicious content into an attribute within a `\u003cnoscript\u003e` tag.\n\n### PoC\n\nA vulnerable page (`+page.svelte`):\n```html\n\u003cscript\u003e\nimport { page } from \"$app/stores\"\n\n// user input\nlet href = $page.url.searchParams.get(\"href\") ?? \"https://example.com\";\n\u003c/script\u003e\n\n\u003cnoscript\u003e\n  \u003ca href={href}\u003etest\u003c/a\u003e\n\u003c/noscript\u003e\n```\n\nIf a user accesses the following URL,\n```\nhttp://localhost:4173/?href=\u003c/noscript\u003e\u003cscript\u003ealert(123)\u003c/script\u003e\n```\nthen, `alert(123)` will be executed.\n\n### Impact\n\nXSS, when using an attribute within a noscript tag","status":"published","published":"2024-08-30T16:49:10Z","modified":"2024-08-30T20:01:24Z","cvss":[{"version":"4.0","score":5.1,"vector":"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","level":"medium"},{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:38:00.257632Z"}],"nvd":[{"id":"CVE-2024-45047","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.","status":"published","published":"2024-08-30T17:15:15.377Z","modified":"2026-06-17T07:53:29.423Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:10:21.771404Z"}],"osv":[{"id":"CVE-2024-45047","title":"Potential mXSS vulnerability due to improper HTML escaping in svelte","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.","status":"published","published":"2024-08-30T16:55:39.106Z","modified":"2026-10-28T02:30:33.995613158Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:44:42.790566Z"},{"id":"GHSA-8266-84wp-wv5c","title":"Svelte has a potential mXSS vulnerability due to improper HTML escaping","description":"### Summary\n\nA potential XSS vulnerability exists in Svelte for versions prior to 4.2.19.\n\n### Details\n\nSvelte improperly escapes HTML on server-side rendering. It converts strings according to the following rules:\n\n- If the string is an attribute value:\n    - `\"` -\u003e `\u0026quot;`\n    - `\u0026` -\u003e `\u0026amp;`\n    - Other characters -\u003e No conversion\n- Otherwise:\n    - `\u003c` -\u003e `\u0026lt;`\n    - `\u0026` -\u003e `\u0026amp;`\n    - Other characters -\u003e No conversion\n\nThe 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. More specifically, this can occur when injecting malicious content into an attribute within a `\u003cnoscript\u003e` tag.\n\n### PoC\n\nA vulnerable page (`+page.svelte`):\n```html\n\u003cscript\u003e\nimport { page } from \"$app/stores\"\n\n// user input\nlet href = $page.url.searchParams.get(\"href\") ?? \"https://example.com\";\n\u003c/script\u003e\n\n\u003cnoscript\u003e\n  \u003ca href={href}\u003etest\u003c/a\u003e\n\u003c/noscript\u003e\n```\n\nIf a user accesses the following URL,\n```\nhttp://localhost:4173/?href=\u003c/noscript\u003e\u003cscript\u003ealert(123)\u003c/script\u003e\n```\nthen, `alert(123)` will be executed.\n\n### Impact\n\nXSS, when using an attribute within a noscript tag","status":"published","published":"2024-08-30T16:49:10Z","modified":"2024-08-30T20:01:23Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"},{"version":"4.0","score":5.1,"vector":"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","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:41.732368Z"},{"id":"CLSA-2026-1776040402","title":"TuxCare security update for svelte (5 CVEs)","description":"TuxCare rebuilt svelte to address 5 CVEs. Fixed in 3.59.2-tuxcare.1.","status":"published","published":"2026-08-04T14:52:24Z","modified":"2026-10-15T09:46:35.699918221Z","updated_at":"2026-11-02T15:43:44.009773Z"},{"id":"CLSA-2026-1776126838","title":"TuxCare security update for svelte (6 CVEs)","description":"TuxCare rebuilt svelte to address 6 CVEs. Fixed in 2.16.1-tuxcare.1.","status":"published","published":"2026-08-04T14:52:25Z","modified":"2026-10-15T09:47:49.780187973Z","updated_at":"2026-11-02T15:43:44.009773Z"},{"id":"CLSA-2026-1776213244","title":"TuxCare security update for svelte (6 CVEs)","description":"TuxCare rebuilt svelte to address 6 CVEs. Fixed in 1.64.1-tuxcare.1.","status":"published","published":"2026-08-04T14:52:25Z","modified":"2026-10-15T09:47:49.789990366Z","updated_at":"2026-11-02T15:43:44.009773Z"},{"id":"CLSA-2026-1776213252","title":"TuxCare security update for svelte (6 CVEs)","description":"TuxCare rebuilt svelte to address 6 CVEs. Fixed in 0.3.0-tuxcare.1.","status":"published","published":"2026-08-04T14:52:25Z","modified":"2026-10-15T09:47:49.842946726Z","updated_at":"2026-11-02T15:43:44.009773Z"}]}}
