Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. svelte
  4. ›
  5. CVE-2022-25875

CVE-2022-25875: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

July 12, 2022 (updated July 19, 2022)

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.

References

  • github.com/sveltejs/svelte/commit/f8605d6acbf66976da9b4547f76e90e163899907
  • github.com/sveltejs/svelte/pull/7530%23issuecomment-1158575990
  • nvd.nist.gov/vuln/detail/CVE-2022-25875
  • snyk.io/vuln/SNYK-JS-SVELTE-2931080

Code Behaviors & Features

Detect and mitigate CVE-2022-25875 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 3.49.0

Fixed versions

  • 3.49.0

Solution

Upgrade to version 3.49.0 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/svelte/CVE-2022-25875.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:35 +0000.