{"id":"CVE-2022-25875","aliases":["CVE-2022-25875","GHSA-wv8q-r932-8hc7","SNYK-JS-SVELTE-2931080"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-site Scripting (XSS)","summary":"The package svelte before 3.49.0 are vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"The package svelte before 3.49.0 are vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.","source":"cvelist"},{"lang":"en","text":"The package svelte before 3.49.0 is vulnerable to Cross-site Scripting (XSS) due to improper input sanitization and to improper escape of attributes when using objects during SSR (Server-Side Rendering). Exploiting this vulnerability is possible via objects with a custom toString() function.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El paquete svelte versiones anteriores a 3.49.0, es vulnerable a un ataque de tipo Cross-site Scripting (XSS) debido a un saneo inapropiado de la entrada y a un escape de atributos inapropiado cuando son usados objetos durante el SSR (Server-Side Rendering). La explotación de esta vulnerabilidad es posible por medio de objetos con una función toString() personalizada","source":"nvd"}],"published":"2022-07-12T14:20:17.950Z","modified":"2026-07-08T06:49:52.155Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"3.49.0","status":"affected"}],"product":"svelte","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.49.0"}],"ecosystem":"npm","package":"svelte","purl":"pkg:npm/svelte","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"3.49.0"}],"vendor":"svelte","product":"svelte","cpe":"cpe:2.3:a:svelte:svelte:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://snyk.io/vuln/SNYK-JS-SVELTE-2931080","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sveltejs/svelte/pull/7530%23issuecomment-1158575990","tags":["broken-link","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/sveltejs/svelte/commit/f8605d6acbf66976da9b4547f76e90e163899907","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25875","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/sveltejs/svelte/pull/7530#23issuecomment-1158575990","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sveltejs/svelte","tags":["package"],"sources":["ghsa"]}],"credits":["Maurício Kishi"],"assigner":"snyk","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-25875","url":"https://www.cve.org/CVERecord?id=CVE-2022-25875","licence":"CVE Terms of Use","modified":"2024-09-17T04:14:01.708Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-wv8q-r932-8hc7","url":"https://github.com/advisories/GHSA-wv8q-r932-8hc7","licence":"CC-BY-4.0","modified":"2026-07-08T06:49:52.155Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-25875","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25875","licence":"Public domain","modified":"2026-06-17T04:34:25.647Z"}],"updatedAt":"2026-11-25T22:58:12.867Z","epss":{"score":0.01464,"percentile":0.74398,"date":"2026-12-01T12:00:22.000Z"}}