Description
Vitest is a testing framework powered by Vite. From 3.0.0 until 3.2.5, 4.1.8, and 5.0.0-beta.4, Vitest Browser Mode exposed a cdp() API that forwarded raw Chrome DevTools Protocol methods without being gated by allowWrite or allowExec, allowing a remote client with exposed browser API metadata to use CDP Page.setDownloadBehavior and Runtime.evaluate to overwrite vite.config.ts and execute attacker-controlled Node.js code. This issue is fixed in versions 3.2.5, 4.1.8, and 5.0.0-beta.
Published: 2026-07-14
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Vitest is a JavaScript testing framework that provides a Browser Mode enabling debugging through the Chrome DevTools Protocol. In the affected releases, this Browser Mode exposed a cdp() API that forwarded raw CDP methods without gating them by allowWrite or allowExec, letting a remote client with exposed browser API metadata execute CDP commands such as Page.setDownloadBehavior and Runtime.evaluate. This permits overwriting vite.config.ts and executing attacker‑controlled Node.js code, providing full remote code execution on any system running a vulnerable Vitest instance.

Affected Systems

Vitest (vitest‑dev:vitest) versions from 3.0.0 up to but not including 3.2.5, all 4.1.x releases before 4.1.8, and all 5.0.0‑beta.x releases before 5.0.0‑beta.4 are vulnerable. The security fix was added in v3.2.5, v4.1.8, and v5.0.0‑beta.4, and all newer releases are considered safe.

Risk and Exploitability

The CVSS score of 9.8 marks the vulnerability as critical, while the EPSS score of < 1% indicates a very low current exploitation probability. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector involves a remote actor that can invoke the exposed browser API; based on the description, it is inferred that the attacker must be able to trigger CDP calls in a client context. Successful exploitation would allow modification of configuration files and execution of attacker‑controlled Node.js code, compromising confidentiality, integrity, and availability of the affected system.

Generated by OpenCVE AI on July 31, 2026 at 05:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Vitest to v3.2.5, v4.1.8, or v5.0.0-beta.4 or later, which contain the fix for the exposed cdp API.
  • Disable Vitest Browser Mode if it is not required, thereby preventing exposure of the cdp interface to untrusted clients.
  • Restrict or sanitize the allowed CDP methods and enforce allowWrite and allowExec controls to prevent unauthorized writes or code execution.

Generated by OpenCVE AI on July 31, 2026 at 05:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-g8mr-85jm-7xhm Vitest Browser: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE
History

Wed, 29 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 16 Jul 2026 00:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-94
References
Metrics threat_severity

None

threat_severity

Important


Wed, 15 Jul 2026 21:15:00 +0000

Type Values Removed Values Added
First Time appeared Vitest.dev
Vitest.dev vitest
Vendors & Products Vitest.dev
Vitest.dev vitest

Tue, 14 Jul 2026 20:00:00 +0000

Type Values Removed Values Added
Description Vitest is a testing framework powered by Vite. From 3.0.0 until 3.2.5, 4.1.8, and 5.0.0-beta.4, Vitest Browser Mode exposed a cdp() API that forwarded raw Chrome DevTools Protocol methods without being gated by allowWrite or allowExec, allowing a remote client with exposed browser API metadata to use CDP Page.setDownloadBehavior and Runtime.evaluate to overwrite vite.config.ts and execute attacker-controlled Node.js code. This issue is fixed in versions 3.2.5, 4.1.8, and 5.0.0-beta.
Title Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE
Weaknesses CWE-749
CWE-862
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}


Subscriptions

Vitest.dev Vitest
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-29T18:26:18.528Z

Reserved: 2026-06-09T20:16:59.647Z

Link: CVE-2026-53633

cve-icon Vulnrichment

Updated: 2026-07-29T18:24:07.479Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-14T19:35:42Z

Links: CVE-2026-53633 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T05:30:07Z

Weaknesses
  • CWE-749

    Exposed Dangerous Method or Function

  • CWE-862

    Missing Authorization

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')