CVE-2022-25875 Cross-site Scripting (XSS)
- Exploited in the wild
- Not known
- Fix
- Available
What is CVE-2022-25875?
CVE-2022-25875 is a medium-severity vulnerability in svelte, published on 12 Jul 2022.
Official 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.
Weakness: CWE-79
Which versions are affected by CVE-2022-25875?
2 open source packages ship an affected version, including svelte. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
svelte npm | All versions | 3.49.0 |
svelte npm | All versions | 3.49.0 |
Products include Svelte Svelte.
How do I fix CVE-2022-25875?
Upgrade svelte to 3.49.0 or later.
Is CVE-2022-25875 being exploited?
There is no known exploitation of CVE-2022-25875 in the wild and no public exploit code.
Other vulnerabilities in svelte
- CVE-2021-29261 Code injection in n/a
- CVE-2026-42567 Svelte: ReDoS in `<svelte:element>` Tag Validation
- CVE-2024-45047 Potential mXSS vulnerability due to improper HTML escaping in svelte
- CVE-2026-42573 Svelte: XSS via DOM Clobbering of Internal Framework State
- CVE-2026-27901 Svelte vulnerable to XSS during SSR with contenteditable `bind:innerText` and `bind:textContent`
Sources
Also known as GHSA-wv8q-r932-8hc7, SNYK-JS-SVELTE-2931080.