Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. vitest
  4. ›
  5. CVE-2025-24964

CVE-2025-24964: Vitest allows Remote Code Execution when accessing a malicious website while Vitest API server is listening

February 4, 2025

Arbitrary remote Code Execution when accessing a malicious website while Vitest API server is listening by Cross-site WebSocket hijacking (CSWSH) attacks.

References

  • github.com/advisories/GHSA-9crc-q9x8-hgqq
  • github.com/vitest-dev/vitest
  • github.com/vitest-dev/vitest/commit/191ef9e34c867d0efd04f49b3d38193a68e825dc
  • github.com/vitest-dev/vitest/commit/7ce9fbb4972d45c6fd34c843645ef6f549bbb241
  • github.com/vitest-dev/vitest/commit/e0fe1d81e2d4bcddb1c6ca3c5c3970d8ba697383
  • github.com/vitest-dev/vitest/security/advisories/GHSA-9crc-q9x8-hgqq
  • nvd.nist.gov/vuln/detail/CVE-2025-24964

Code Behaviors & Features

Detect and mitigate CVE-2025-24964 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 up to 0.0.125, all versions starting from 1.0.0 before 1.6.1, all versions starting from 2.0.0 before 2.1.9, all versions starting from 3.0.0 before 3.0.5

Fixed versions

  • 1.6.1
  • 2.1.9
  • 3.0.5

Solution

Upgrade to versions 1.6.1, 2.1.9, 3.0.5 or above.

Impact 9.6 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-1385: Missing Origin Validation in WebSockets

Source file

npm/vitest/CVE-2025-24964.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:16:49 +0000.