{"id":"GHSA-wv8q-r932-8hc7","summary":"Svelte vulnerable to XSS when using objects during server-side rendering","details":"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.","aliases":["CVE-2022-25875","SNYK-JS-SVELTE-2931080"],"modified":"2026-05-01T04:12:12.364356549Z","published":"2022-07-13T00:00:41Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2022-07-15T16:22:17Z","nvd_published_at":"2022-07-12T19:15:00Z","cwe_ids":["CWE-79"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-25875"},{"type":"WEB","url":"https://github.com/sveltejs/svelte/pull/7530#23issuecomment-1158575990"},{"type":"WEB","url":"https://github.com/sveltejs/svelte/commit/f8605d6acbf66976da9b4547f76e90e163899907"},{"type":"PACKAGE","url":"https://github.com/sveltejs/svelte"},{"type":"WEB","url":"https://snyk.io/vuln/SNYK-JS-SVELTE-2931080"}],"affected":[{"package":{"name":"svelte","ecosystem":"npm","purl":"pkg:npm/svelte"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"3.49.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/07/GHSA-wv8q-r932-8hc7/GHSA-wv8q-r932-8hc7.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}