Home / vitest-dev / vitest / CVE-2025-24964
CVE-2025-24964: is it exploited, and which versions of vitest-dev vitest are affected and fixed?
CVE-2025-24964 is a missing Origin Validation in WebSockets vulnerability in vitest-dev vitest. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 12:38 UTC). Affected: vitest from 1.0.0 before 1.6.1, vitest from 2.0.0 before 2.1.9, vitest from 3.0.0 before 3.0.5 and 1 more (GitHub advisory GHSA-9crc-q9x8-hgqq). Fixed in 1.6.1, 2.1.9 and 3.0.5 (GitHub advisory GHSA-9crc-q9x8-hgqq). Severity: Critical (9.7, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 12:38 UTC, CVE record November 19, 2026, 07:10 UTC and NVD November 19, 2026, 07:23 UTC.
What is CVE-2025-24964?
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.
From the CVE record by GitHub_M, last updated February 12, 2025, 20:51 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| vitest-dev | vitest | <= 0.0.125 >= 1.0.0, < 1.6.1 >= 2.0.0, < 2.1.9 >= 3.0.0, < 3.0.5 |
As the CVE record by GitHub_M states it, last updated February 12, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | vitest | >= 1.0.0, < 1.6.1 | 1.6.1 | GHSA-9crc-q9x8-hgqq |
| npm | vitest | >= 2.0.0, < 2.1.9 | 2.1.9 | GHSA-9crc-q9x8-hgqq |
| npm | vitest | >= 3.0.0, < 3.0.5 | 3.0.5 | GHSA-9crc-q9x8-hgqq |
| npm | vitest | <= 0.0.125 | none listed | GHSA-9crc-q9x8-hgqq |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated February 4, 2025. Summary: Vitest allows Remote Code Execution when accessing a malicious website while Vitest API server is listening.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| vitest.dev | vitest | through 0.0.125 | application |
| vitest.dev | vitest | from 1.0.0 before 1.6.1 | application |
| vitest.dev | vitest | from 2.0.0 before 2.1.9 | application |
| vitest.dev | vitest | from 3.0.0 before 3.0.5 | application |
NVD analysis (status Analyzed), last modified June 17, 2026, 08:59 UTC.
How severe is CVE-2025-24964?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.7 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H | GitHub_M |
| High 8.8 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2025-24964 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: no; technical impact: total (CISA ADP, February 4, 2025)
- EPSS
- 0.68% probability of exploitation activity in the next 30 days, percentile 53.6 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-1385 Missing Origin Validation in WebSockets
Where are the vendor advisories and references?
- https://github.com/vitest-dev/vitest/security/advisories/GHSA-9crc-q9x8-hgqq x_refsource_CONFIRM
- https://github.com/vitest-dev/vitest/blob/9a581e1c43e5c02b11e2a8026a55ce6a8cb35114/packages/vitest/src/api/setup.ts#L32-L46 x_refsource_MISC
- https://github.com/vitest-dev/vitest/blob/9a581e1c43e5c02b11e2a8026a55ce6a8cb35114/packages/vitest/src/api/setup.ts#L66-L76 x_refsource_MISC
- https://vitest.dev/config/#api x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- January 29, 2025
- Published
- February 4, 2025, 19:36 UTC
- CVE record updated
- February 12, 2025, 20:51 UTC by GitHub_M
- NVD
- Analyzed, last modified June 17, 2026, 08:59 UTC
- Last checked
- CVE list November 19, 2026, 07:10 UTC; NVD November 19, 2026, 07:23 UTC; KEV December 3, 2026, 12:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect vitest?
- Oct 20, 2026CVE-2026-112950 vitest-dev vitest: path traversal (reading or writing files outside the intended folder)
- Oct 20, 2026CVE-2026-112949 vitest-dev vitest: code injection (remote code execution)
- Oct 20, 2026CVE-2026-112948 vitest-dev vitest: information disclosure
- Sep 1, 2026CVE-2026-84373 vitest-dev vitest: path traversal (reading or writing files outside the intended folder)
- Aug 13, 2026CVE-2026-73653 vitest-dev vitest: path traversal (reading or writing files outside the intended folder)
- Jul 14, 2026CVE-2026-53633 vitest-dev vitest: exposed Dangerous Method or Function
- Jul 14, 2026CVE-2026-47428 vitest-dev vitest: cross-site scripting (XSS)
- Jul 14, 2026CVE-2026-47429 vitest-dev vitest: path traversal (reading or writing files outside the intended folder)
Questions about CVE-2025-24964
Is CVE-2025-24964 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 12:38 UTC. FIRST's EPSS gives it a 0.68% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of vitest-dev vitest are affected by CVE-2025-24964?
vitest from 1.0.0 before 1.6.1, vitest from 2.0.0 before 2.1.9, vitest from 3.0.0 before 3.0.5 and vitest through 0.0.125, per the GitHub advisory GHSA-9crc-q9x8-hgqq. The tables above give every range the sources list.
Which version fixes CVE-2025-24964?
1.6.1, 2.1.9 and 3.0.5, per the GitHub advisory GHSA-9crc-q9x8-hgqq. Check the vendor's advisory before you rely on it.
How severe is CVE-2025-24964?
Critical (9.7, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2025-24964?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.