Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2025-24964

9.6 · CRITICAL
Published Feb 4, 2025 vitest.dev CWE-1385 EPSS 0.68% (50th pctl)

Overview

CVE-2025-24964 is a critical-severity vulnerability affecting vitest.dev vitest. It was published on February 4, 2025 and has a CVSS 3.1 base score of 9.6 (CRITICAL).

This vulnerability has a CVSS 3.1 base score of 9.6, rated CRITICAL. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

Technical Description

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.

Remediation

Check the references section for vendor advisories and patches from vitest.dev. Update vitest to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
vitest.dev vitest 0 Affected

Frequently Asked Questions

What is CVE-2025-24964?

CVE-2025-24964 is a critical-severity vulnerability affecting vitest.dev vitest. It was published on February 4, 2025 and has a CVSS 3.1 base score of 9.6 (CRITICAL).

How severe is CVE-2025-24964?

This vulnerability has a CVSS 3.1 base score of 9.6, rated CRITICAL. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

How do I fix or remediate CVE-2025-24964?

Check the references section for vendor advisories and patches from vitest.dev. Update vitest to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2025-24964?

CyberStrike's AI-powered security agents can automatically detect CVE-2025-24964 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.