vitest-dev vitest up to 0.0.125/1.6.0/2.1.8/3.0.4 API Server missing origin validation in websockets
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 8.1 | $0-$5k | 0.00 |
Summary
A vulnerability classified as critical has been found in vitest-dev vitest up to 0.0.125/1.6.0/2.1.8/3.0.4. This vulnerability affects unknown code of the component API Server. The manipulation leads to missing origin validation in websockets. This vulnerability is documented as CVE-2025-24964. The attack can be initiated remotely. There is not any exploit available. It is recommended to upgrade the affected component.
Details
A vulnerability, which was classified as critical, has been found in vitest-dev vitest up to 0.0.125/1.6.0/2.1.8/3.0.4. This issue affects some unknown processing of the component API Server. The manipulation with an unknown input leads to a missing origin validation in websockets vulnerability. Using CWE to declare the problem leads to CWE-1385. The product uses a WebSocket, but it does not properly verify that the source of data or communication is valid. Impacted is confidentiality, integrity, and availability. The summary by CVE is:
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.
It is possible to read the advisory at github.com. The identification of this vulnerability is CVE-2025-24964 since 01/29/2025. The exploitation is known to be easy. The attack may be initiated remotely. No form of authentication is needed for a successful exploitation. It demands that the victim is doing some kind of user interaction. The technical details are unknown and an exploit is not publicly available.
Upgrading to version 1.6.1, 2.1.9 or 3.0.5 eliminates this vulnerability.
Be aware that VulDB is the high quality source for vulnerability data.
Product
Vendor
Name
Version
- 0.0.125
- 1.0
- 1.1
- 1.2
- 1.3
- 1.4
- 1.5
- 1.6.0
- 2.1.0
- 2.1.1
- 2.1.2
- 2.1.3
- 2.1.4
- 2.1.5
- 2.1.6
- 2.1.7
- 2.1.8
- 3.0.0
- 3.0.1
- 3.0.2
- 3.0.3
- 3.0.4
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 8.2VulDB Meta Temp Score: 8.1
VulDB Base Score: 6.3
VulDB Temp Score: 6.0
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 8.8
NVD Vector: 🔍
CNA Base Score: 9.6
CNA Vector (GitHub_M): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Missing origin validation in websocketsCWE: CWE-1385 / CWE-346 / CWE-345
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: vitest 1.6.1/2.1.9/3.0.5
Timeline
01/29/2025 🔍02/04/2025 🔍
02/04/2025 🔍
12/31/2025 🔍
Sources
Product: github.comAdvisory: GHSA-9crc-q9x8-hgqq
Status: Confirmed
CVE: CVE-2025-24964 (🔍)
GCVE (CVE): GCVE-0-2025-24964
GCVE (VulDB): GCVE-100-294671
Entry
Created: 02/04/2025 21:27Updated: 12/31/2025 17:49
Changes: 02/04/2025 21:27 (64), 12/31/2025 17:49 (12)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.