CVE-2022-25875Svelte
Medium 6.1 No auth needed
Follow: this CVE · Svelte · Svelte We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.1% probability of exploitation in 30 days · percentile 66
- Auth required
- No
- Published
- Jul 12, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Svelte.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | svelte |
< 3.49.0 |
3.49.0 |
npm install svelte@3.49.0 |
Per OSV / GitHub Advisories (GHSA-wv8q-r932-8hc7). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| svelte | svelte | < 3.49.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Exploit Patch Third Party Advisory
- github.com Broken Link
- snyk.io Exploit Patch Third Party Advisory