CVE-2026-53633

Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE

Published Jul 14, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical 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.

Remediation

No solution or workaround provided in the CVE record.

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
Type Values Removed Values Added
Metrics ssvc

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

Type Values Removed Values Added
First Time appeared Vitest.dev
Vitest.dev vitest
Vendors & Products Vitest.dev
Vitest.dev vitest
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'}

Weaknesses
  • CWE-749

    Exposed Dangerous Method or Function

  • CWE-862

    Missing Authorization

  • CWE-94

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 29, 2026, 6:26 PM
Reserved
Jun 9, 2026, 8:16 PM
Status
Awaiting Analysis
Published
Jul 14, 2026, 8:17 PM
Modified
Oct 24, 2026, 9:10 PM
Severity
Important
Public date
Jul 14, 2026, 7:35 PM