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
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
8.1$0-$5k0.00

Summaryinfo

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.

Detailsinfo

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.

Productinfo

Vendor

Name

Version

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 8.2
VulDB 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): 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Missing origin validation in websockets
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: vitest 1.6.1/2.1.9/3.0.5

Timelineinfo

01/29/2025 🔍
02/04/2025 +6 days 🔍
02/04/2025 +0 days 🔍
12/31/2025 +330 days 🔍

Sourcesinfo

Product: github.com

Advisory: GHSA-9crc-q9x8-hgqq
Status: Confirmed

CVE: CVE-2025-24964 (🔍)
GCVE (CVE): GCVE-0-2025-24964
GCVE (VulDB): GCVE-100-294671

Entryinfo

Created: 02/04/2025 21:27
Updated: 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.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!