CVE-2022-25875
Cross-site Scripting (XSS)
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.4
Cross-site Scripting (XSS)
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.
- Record
CVE-2022-25875- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P - Updated
- 2026-11-02
EUVDEUVD-2022-6441
5.4
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.
- Record
EUVD-2022-6441- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-wv8q-r932-8hc7
6.1
Svelte vulnerable to XSS when using objects during server-side rendering
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.
- Record
GHSA-wv8q-r932-8hc7- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
5.4
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.
- Record
CVE-2022-25875- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
5.4
Cross-site Scripting (XSS)
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.
- Record
CVE-2022-25875- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P - Updated
- 2026-11-02
OSVGHSA-wv8q-r932-8hc7
6.1
Svelte vulnerable to XSS when using objects during server-side rendering
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.
- Record
GHSA-wv8q-r932-8hc7- CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVCLSA-2026-1776126838 No score
TuxCare security update for svelte (6 CVEs)
TuxCare rebuilt svelte to address 6 CVEs. Fixed in 2.16.1-tuxcare.1.
- Record
CLSA-2026-1776126838- Updated
- 2026-11-02
OSVCLSA-2026-1776213244 No score
TuxCare security update for svelte (6 CVEs)
TuxCare rebuilt svelte to address 6 CVEs. Fixed in 1.64.1-tuxcare.1.
- Record
CLSA-2026-1776213244- Updated
- 2026-11-02
OSVCLSA-2026-1776213252 No score
TuxCare security update for svelte (6 CVEs)
TuxCare rebuilt svelte to address 6 CVEs. Fixed in 0.3.0-tuxcare.1.
- Record
CLSA-2026-1776213252- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
sveltenpm |
before 3.49.0 | 3.49.0 |
svelteTuxCare:npm From an advisory covering 6 CVEs |
2.16.1-tuxcare.0 up to 2.16.1-tuxcare.1, plus listed versions 2.16.1 |
2.16.1-tuxcare.1 |
svelteTuxCare:npm From an advisory covering 6 CVEs |
1.64.1-tuxcare.0 up to 1.64.1-tuxcare.1, plus listed versions 1.64.1 |
1.64.1-tuxcare.1 |
svelteTuxCare:npm From an advisory covering 6 CVEs |
0.3.0-tuxcare.0 up to 0.3.0-tuxcare.1, plus listed versions 0.3.0 |
0.3.0-tuxcare.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases, products, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2022-25875 is a medium vulnerability (CVSS 5.4) in Svelte, published July 12, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.44%, the 73rd percentile. Fixed in svelte 3.49.0.
References
snyk.io/vuln/SNYK-JS-SVELTE-2931080
github.com/sveltejs/svelte/pull/7530%23issuecomment-1158575990
github.com/sveltejs/svelte/commit/f8605d6acbf66976da9b4547f76e90e163899907
nvd.nist.gov/vuln/detail/CVE-2022-25875
github.com/sveltejs/svelte/pull/7530
github.com/advisories/GHSA-wv8q-r932-8hc7
github.com/CVEProject/cvelistV5/tree/main/cves/2022/25xxx/CVE-2022-25875.json
github.com/sveltejs/svelte