Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦
📦 npm
Not in CISA KEV
CRITICAL severity

CVE-2026-53633 — @vitest/browser

CRITICALFix: vitest-dev/vitest@385a1ae

CVE-2026-53633 is a critical-severity (CVSS 9.8) CWE-749 vulnerability in @vitest/browser. A fix is available for @vitest/browser — see the affected versions and patch details below.

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

Also known asGHSA-g8mr-85jm-7xhm
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Oct 13, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-53633.

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs58th percentile — riskier than 58% of all scored CVEsHighest risk
0.08%0.52%0.96%1.40%0.6%0.9%0.9%0.9%Aug 26Oct 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2026-53633 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 388,997 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

4 pkgs affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

37other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@vitest/browsernpm
13.6Mdownloads / week

Description

Summary

Vitest Browser Mode exposes a cdp() API that forwards raw Chrome DevTools Protocol (CDP) methods over the Vitest browser WebSocket RPC. CDP is not gated by browser.api.allowWrite, browser.api.allowExec, api.allowWrite, or api.allowExec.

As a result, disabling Browser Mode write and exec operations does not prevent a browser API client from using CDP to perform equivalent actions. In a verified reproduction with allowWrite: false and allowExec: false, CDP Page.setDownloadBehavior set the browser download directory to the project root, and CDP Runtime.evaluate downloaded a controlled vite.config.ts. Vitest reloaded the changed config and executed attacker-controlled Node.js code.

When the Browser Mode API is also exposed to the network, this becomes remotely exploitable because the generated browser runner page exposes the API token, active session id, project name, and project root path needed to connect to the browser WebSocket API and select the target download directory.

Impact

This affects Browser Mode projects using a CDP-capable provider, such as Playwright Chromium, when the browser API server is exposed to the network, for example with --browser.api.host=0.0.0.0.

In this mode Vitest warns that write and exec operations are disabled by default, but the generated browser runner page exposes enough metadata for a remote client to authenticate to the browser WebSocket API while an active session exists. This includes the browser API token, active session id, project name, and serialized test config including the project root path. The attacker can then call Vitest's CDP RPC and use Chrome's download controls to overwrite vite.config.ts in the project root. When Vitest reloads the changed config, attacker-controlled Node.js code executes on the host running Vitest.

The same exposed CDP bridge also allows direct browser-session JavaScript execution through Runtime.evaluate. A separate local probe showed that CDP can navigate the browser to a file:// URL and read rendered file contents, but the primary verified impact is config-file overwrite leading to RCE.

Reproduction

For a concrete reproduction, start Browser Mode in watch mode using the official Lit example:

pnpm dlx tiged vitest-dev/vitest/examples/lit vitest-poc
cd vitest-poc
pnpm install

Configure the Browser Mode API to listen on all interfaces while explicitly disabling write and exec operations:

import { playwright } from '@vitest/browser-playwright'
import { defineConfig } from 'vite'

export default defineConfig({
  test: {
    browser: {
      enabled: true,
      provider: playwright(),
      instances: [
        { browser: 'chromium' },
      ],
      api: {
        host: '0.0.0.0',
        allowWrite: false,
        allowExec: false,
      },
    },
  },
})

Then start the test server:

pnpm test

Vitest serves the browser runner HTML and WebSocket API at http://localhost:63315.

While the browser session is active:

  1. Fetch the generated browser runner page:

    http://localhost:63315/__vitest_test__/
    
  2. Extract the embedded browser API token, active session id, project name, and project root:

    • window.VITEST_API_TOKEN
    • __vitest_browser_runner__.sessionId
    • __vitest_browser_runner__.config.name
    • __vitest_browser_runner__.config.root
  3. Connect to the browser API WebSocket as a tester client:

    /__vitest_browser_api__?type=tester&rpcId=<fresh-id>&sessionId=<session-id>&projectName=<project-name>&method=none&token=<token>
    
  4. Call the sendCdpEvent RPC method with:

    Page.setDownloadBehavior({
      behavior: "allow",
      downloadPath: __vitest_browser_runner__.config.root
    })
    
  5. Call sendCdpEvent again with Runtime.evaluate. The evaluated JavaScript creates a Blob containing a malicious Vite config and clicks an anchor element <a download="vite.config.ts">.

  6. Observed result:

    • vite.config.ts is overwritten with attacker-controlled content.
    • Vitest reloads the changed config.
    • The injected Node.js payload runs on the host.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
📦npm@vitest/browser≥ 5.0.0-beta.0&&< 5.0.0-beta.45.0.0-beta.4npm install @vitest/browser@5.0.0-beta.4
📦npm@vitest/browser≥ 4.0.0&&< 4.1.84.1.8npm install @vitest/browser@4.1.8
📦npm@vitest/browser≥ 3.0.0&&< 3.2.53.2.5npm install @vitest/browser@3.2.5
📦npmvite-plusall versions0.1.24npm install vite-plus@0.1.24

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @vitest/browser, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @vitest/browser to 5.0.0-beta.4 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-53633 is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant

Red Hat has assessed this flaw against its shipping products. The vulnerability requires Vitest Browser Mode (the @vitest/browser package) to be installed AND explicitly enabled (browser.enabled: true), paired with a CDP-capable browser provider such as Playwright Chromium, an actively running test session, and the…

Workaround published by Red Hat
No mitigation is required for Red Hat shipping products, as Vitest Browser Mode and its CDP proxy feature are not enabled or reachable in any Red Hat product's build, test, or runtime configuration. Development teams that do enable Vitest Browser Mode with a CDP-capable provider (Playwright or WebdriverIO) should avoid exposing the Browser Mode API server to untrusted networks (do not set --browser.api.host=0.0.0.0 or equivalent) and should upgrade to @vitest/browser 3.2.5, 4.1.8, 5.0.0-beta.4, or later, and vite-plus 0.1.24 or later.
Source: Red Hat security advisory for CVE-2026-53633 (CC BY 4.0)

Frequently Asked Questions

## Summary Vitest Browser Mode exposes a `cdp()` API that forwards raw Chrome DevTools Protocol (CDP) methods over the Vitest browser WebSocket RPC. CDP is not gated by `browser.api.allowWrite`, `browser.api.allowExec`, `api.allowWrite`, or `api.allowExec`. As a result, disabling Browser Mode write and exec operations does not prevent a browser API client from using CDP to perform equivalent actions. In a verified reproduction with `allowWrite: false` and `allowExec: false`, CDP `Page.setDownloadBehavior` set the browser download directory to the project root, and CDP `Runtime.evaluate` down
O3 Security · Impact-Aware SCA

Is CVE-2026-53633 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2026-53633: @vitest/browser — Fixed in 5.0.0-beta.4