CVE-2025-24964 describes a critical Cross-site WebSocket Hijacking (CSWSH) vulnerability in Vitest, a testing framework, affecting versions prior to 1.6.1, 2.1.9, and 3.0.5. This flaw allows an attacker to achieve arbitrary remote code execution when a user accesses a malicious website while the Vitest API server is active, particularly when the 'api' option (enabled by Vitest UI) is in use. The vulnerability stems from the WebSocket server's lack of Origin header validation and authorization, enabling an attacker to inject and execute code via the saveTestFile and rerun APIs. With a CVSS score of 8.8 (High), this vulnerability presents a significant risk due to its network-based attack vector, low attack complexity, and high impact on confidentiality, integrity, and availability. There is currently no evidence of active exploitation, public exploit code, or significant community discussion, and it is not listed in the KEV catalog.
| Vendor | Product | Version(s) | CPE |
|---|---|---|---|
<= 0.0.125CPE matchmatch criteria | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* | ||
>= 1.0.0, < 1.6.1CPE matchmatch criteria | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* | ||
>= 2.0.0, < 2.1.9CPE matchmatch criteria | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* | ||
>= 3.0.0, < 3.0.5CPE matchmatch criteria | cpe:2.3:a:vitest.dev:vitest:*:*:*:*:*:node.js:*:* |
CVSS version used by this source: 3.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
The average CVE in this peer group has 0.0 Twitter, 0.1 Reddit, 0.2 Bluesky, 0.1 Mastodon, and 0.2 GitHub mentions.
No media coverage found for this CVE.
The average CVE in this peer group has 0.3 InfoSec Media, 0.0 Vendor Blog, and 0.1 Security Researcher mentions.