GHSA-9crc-q9x8-hgqq · Severity: critical · Ecosystem: npm — Vitest allows Remote Code Execution when accessing a malicious website while Vitest API server is listening
Vitest is a testing framework powered by Vite. Affected versions are subject to arbitrary remote Code Execution when accessing a malicious website while Vitest API server is listening by Cross-site WebSocket hijacking (CSWSH) attacks. When `api` option is enabled (Vitest UI enables it), Vitest starts a WebSocket server. This WebSocket server did not check Origin header and did not have any authorization mechanism and was vulnerable to CSWSH attacks. This WebSocket server has `saveTestFile` API that can edit a test file and `rerun` API that can rerun the tests. An attacker can execute arbitrary code by injecting a code in a test file by the `saveTestFile` API and then running that file by calling the `rerun` API. This vulnerability can result in remote code execution for users that are using Vitest serve API. This issue has been patched in versions 1.6.1, 2.1.9 and 3.0.5. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Conclusion & alert: CVE-2025-24964 is rated High Exploit Risk (80.2/100): CVSS Critical severity, with medium exploitation likelihood (EPSS 1.94%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
| EDB-ID | Source | Kind | Published | Link |
|---|---|---|---|---|
| — | nvd_ref | exploit_tag | Exploit-DB ↗ |
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-05-24 | 4.39% | 1.94% | -2.45% |
| 2 | 2026-03-25 | 4.63% | 4.39% | -0.25% |
| 3 | 2026-03-15 | — | 4.63% | — |
Full EPSS history (9 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 9.6 | 3.1 | CRITICAL |
|
2.8 | 6.0 | [email protected] |
| 8.8 | 3.1 | HIGH |
|
2.8 | 5.9 | [email protected] |
GHSA-9crc-q9x8-hgqq · Severity: critical · Ecosystem: npm — Vitest allows Remote Code Execution when accessing a malicious website while Vitest API server is listening
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| vitest.dev | vitest | <= 0.0.125 | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* |
| vitest.dev | vitest | >= 1.0.0, < 1.6.1 | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* |
| vitest.dev | vitest | >= 2.0.0, < 2.1.9 | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* |
| vitest.dev | vitest | >= 3.0.0, < 3.0.5 | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* |