What’s Vulnerable › Vulnerabilities
CVE-2022-25875: Cross-site Scripting (XSS)
- Severity: medium (CVSS 6.1 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.4% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-07-12 · updated 2026-06-17
- Weakness: CWE-79
Description
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.
Affected products
- sveltejs svelte: before 3.49.0 — fixed in 3.49.0
How to fix
Upgrade to a fixed version: sveltejs svelte 3.49.0. Check the vendor advisory for mitigations.
References
- https://github.com/sveltejs/svelte/commit/f8605d6acbf66976da9b4547f76e90e163899907
- https://github.com/sveltejs/svelte/pull/7530%23issuecomment-1158575990
- https://snyk.io/vuln/SNYK-JS-SVELTE-2931080
- https://github.com/sveltejs/svelte/commit/f8605d6acbf66976da9b4547f76e90e163899907
- https://github.com/sveltejs/svelte/pull/7530%23issuecomment-1158575990
- https://snyk.io/vuln/SNYK-JS-SVELTE-2931080
Get alerted when CVE-2022-25875 or the next vulnerability affects your stack