# CVE-2022-25875: Cross-site Scripting (XSS)

- Severity: Medium 5.4 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.46%, higher than 74% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2022-07-12T14:20:17.950Z
- Modified: 2026-07-08T06:49:52.155Z
- Also known as: GHSA-wv8q-r932-8hc7, SNYK-JS-SVELTE-2931080
- Weaknesses: CWE-79
- Assigned by: snyk

## 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.

(As written by CVE List.)

## Affected

- svelte: from unspecified before 3.49.0
- svelte (npm): before 3.49.0
- svelte svelte: before 3.49.0

## Every score

- snyk: 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`
- GitHub: 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`
- NVD: 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`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-SVELTE-2931080> (exploit, patch, third-party-advisory, web)
- <https://github.com/sveltejs/svelte/commit/f8605d6acbf66976da9b4547f76e90e163899907> (exploit, patch, third-party-advisory, web)
- <https://github.com/sveltejs/svelte/pull/7530%23issuecomment-1158575990> (broken-link)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-25875> (advisory)
- <https://github.com/sveltejs/svelte/pull/7530#23issuecomment-1158575990> (web)
- <https://github.com/sveltejs/svelte> (package)

## Sources

- CVE List: [CVE-2022-25875](https://www.cve.org/CVERecord?id=CVE-2022-25875), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-wv8q-r932-8hc7](https://github.com/advisories/GHSA-wv8q-r932-8hc7), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2022-25875](https://nvd.nist.gov/vuln/detail/CVE-2022-25875), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-25875 · Whole record: https://cve.day/CVE-2022-25875.json · Rebuilt by cve.day 2026-11-25T22:58:12.867Z
