{"id":"CVE-2026-53633","aliases":["CLSA-2026-1789901057","CLSA-2026-1790459317","CLSA-2026-1792160942","CLSA-2026-1792160962","CLSA-2026-1792161473","CLSA-2026-1792161477","CLSA-2026-1792161574","CLSA-2026-1792161608","CLSA-2026-1792161647","CLSA-2026-1792161653","CLSA-2026-1792161665","CLSA-2026-1792161719","CLSA-2026-1792161724","CLSA-2026-1792161766","CLSA-2026-1792161771","CLSA-2026-1792161831","CLSA-2026-1792161834","CLSA-2026-1792161876","CLSA-2026-1792161880","CLSA-2026-1792161945","CLSA-2026-1792161974","CLSA-2026-1792162013","CLSA-2026-1792162034","CLSA-2026-1792162039","CLSA-2026-1792162063","EUVD-2026-44403","GHSA-g8mr-85jm-7xhm"],"status":"published","title":"Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE","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.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00896,"percentile":0.59801,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-749","CWE-862"],"published":"2026-06-15T20:05:15Z","modified":"2026-10-28T02:30:24Z","fixes":[{"ecosystem":"npm","package":"@vitest/browser","fixed_in":["5.0.0-beta.4","4.1.8","3.2.5"],"sources":["ghsa","osv"]},{"ecosystem":"npm","package":"vite-plus","fixed_in":["0.1.24"],"sources":["ghsa","osv"]},{"ecosystem":"TuxCare:npm","package":"vitest","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/browser","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/utils","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/snapshot","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/coverage-istanbul","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/coverage-v8","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/expect","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/mocker","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/pretty-format","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/spy","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/ui","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/web-worker","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/runner","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]},{"ecosystem":"TuxCare:npm","package":"@vitest/ws-client","fixed_in":["3.2.4-tuxcare.4"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"@vitest/browser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.0.0-beta.0"},{"last_affected":"5.0.0-beta.3"},{"fixed":"5.0.0-beta.4"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@vitest/browser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.0"},{"last_affected":"4.1.7"},{"fixed":"4.1.8"}]}]},{"source":"ghsa","ecosystem":"npm","package":"@vitest/browser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"last_affected":"3.2.4"},{"fixed":"3.2.5"}]}]},{"source":"ghsa","ecosystem":"npm","package":"vite-plus","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"0.1.23"},{"fixed":"0.1.24"}]}]},{"source":"osv","ecosystem":"TuxCare:npm","package":"vitest","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"vitest","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/browser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/utils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/snapshot","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/snapshot","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/browser","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/browser-playwright","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/browser-preview","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/coverage-istanbul","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/coverage-v8","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/expect","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/expect","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/mocker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/mocker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/pretty-format","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/pretty-format","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/spy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/spy","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/ui","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/utils","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/web-worker","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.0.18-tuxcare.0"},{"fixed":"4.0.18-tuxcare.2"}]}],"versions":["4.0.18","4.0.18-tuxcare.1"],"bundled":2},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/runner","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"TuxCare:npm","package":"@vitest/ws-client","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.2.4-tuxcare.0"},{"fixed":"3.2.4-tuxcare.4"}]}],"versions":["3.2.4","3.2.4-tuxcare.1","3.2.4-tuxcare.2","3.2.4-tuxcare.3"]},{"source":"osv","ecosystem":"npm","package":"@vitest/browser","ranges":[{"type":"SEMVER","events":[{"introduced":"5.0.0-beta.0"},{"fixed":"5.0.0-beta.4"}]}]},{"source":"osv","ecosystem":"npm","package":"@vitest/browser","ranges":[{"type":"SEMVER","events":[{"introduced":"4.0.0"},{"fixed":"4.1.8"}]}]},{"source":"osv","ecosystem":"npm","package":"@vitest/browser","ranges":[{"type":"SEMVER","events":[{"introduced":"3.0.0"},{"fixed":"3.2.5"}]}]},{"source":"osv","ecosystem":"npm","package":"vite-plus","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.1.24"}]}]}],"products":[{"vendor":"vitest-dev","product":"vitest"}],"references":[{"url":"https://github.com/vitest-dev/vitest/security/advisories/GHSA-g8mr-85jm-7xhm","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/vitest-dev/vitest/pull/10444","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/vitest-dev/vitest/pull/10450","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/vitest-dev/vitest/pull/10456","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/vitest-dev/vitest/commit/385a1aefd4c2bfa5e7d58bf7c6834c929969f2c7","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/vitest-dev/vitest/commit/63e3b2eee4d58da56786a6333f517b9b492528c7","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/vitest-dev/vitest/commit/e4067b3b150005fd42cf75f994300119245806b9","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v3.2.5","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v4.1.8","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.4","tags":["x_refsource_MISC","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53633","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-g8mr-85jm-7xhm"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53633.json","tags":["advisory"]},{"url":"https://github.com/vitest-dev/vitest","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-53633","title":"Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE","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.","status":"published","published":"2026-07-14T19:35:42.739Z","modified":"2026-07-29T18:26:18.528Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-749","CWE-862"],"updated_at":"2026-11-02T14:20:00.11477Z"}],"euvd":[{"id":"EUVD-2026-44403","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.","status":"published","published":"2026-07-14T19:35:42Z","modified":"2026-07-29T18:26:18Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T18:02:29.807737Z"}],"ghsa":[{"id":"GHSA-g8mr-85jm-7xhm","title":"Vitest Browser: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE","description":"## Summary\n\nVitest 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`.\n\nAs 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.\n\nWhen 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.\n\n## Impact\n\nThis 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`.\n\nIn 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.\n\nThe 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.\n\n## Reproduction\n\nFor a concrete reproduction, start Browser Mode in watch mode using the official Lit example:\n\n```sh\npnpm dlx tiged vitest-dev/vitest/examples/lit vitest-poc\ncd vitest-poc\npnpm install\n```\n\nConfigure the Browser Mode API to listen on all interfaces while explicitly disabling write and exec operations:\n\n```ts\nimport { playwright } from '@vitest/browser-playwright'\nimport { defineConfig } from 'vite'\n\nexport default defineConfig({\n  test: {\n    browser: {\n      enabled: true,\n      provider: playwright(),\n      instances: [\n        { browser: 'chromium' },\n      ],\n      api: {\n        host: '0.0.0.0',\n        allowWrite: false,\n        allowExec: false,\n      },\n    },\n  },\n})\n```\n\nThen start the test server:\n\n```sh\npnpm test\n```\n\nVitest serves the browser runner HTML and WebSocket API at `http://localhost:63315`.\n\nWhile the browser session is active:\n\n1. Fetch the generated browser runner page:\n\n   ```text\n   http://localhost:63315/__vitest_test__/\n   ```\n\n2. Extract the embedded browser API token, active session id, project name, and project root:\n\n   - `window.VITEST_API_TOKEN`\n   - `__vitest_browser_runner__.sessionId`\n   - `__vitest_browser_runner__.config.name`\n   - `__vitest_browser_runner__.config.root`\n\n3. Connect to the browser API WebSocket as a tester client:\n\n   ```text\n   /__vitest_browser_api__?type=tester\u0026rpcId=\u003cfresh-id\u003e\u0026sessionId=\u003csession-id\u003e\u0026projectName=\u003cproject-name\u003e\u0026method=none\u0026token=\u003ctoken\u003e\n   ```\n\n4. Call the `sendCdpEvent` RPC method with:\n\n   ```text\n   Page.setDownloadBehavior({\n     behavior: \"allow\",\n     downloadPath: __vitest_browser_runner__.config.root\n   })\n   ```\n\n5. Call `sendCdpEvent` again with `Runtime.evaluate`. The evaluated JavaScript creates a Blob containing a malicious Vite config and clicks an anchor element `\u003ca download=\"vite.config.ts\"\u003e`.\n\n6. Observed result:\n\n   - `vite.config.ts` is overwritten with attacker-controlled content.\n   - Vitest reloads the changed config.\n   - The injected Node.js payload runs on the host.","status":"published","published":"2026-06-15T20:05:15Z","modified":"2026-08-13T18:19:32Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-749","CWE-862"],"updated_at":"2026-11-02T14:41:00.097339Z"}],"nvd":[{"id":"CVE-2026-53633","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.","status":"published","published":"2026-07-14T20:17:42.173Z","modified":"2026-10-24T21:10:00.13Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-749","CWE-862"],"updated_at":"2026-11-02T14:12:29.879716Z"}],"osv":[{"id":"CVE-2026-53633","title":"Vitest: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE","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.","status":"published","published":"2026-07-14T19:35:42.739Z","modified":"2026-10-28T02:30:24.15379517Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-749","CWE-862"],"updated_at":"2026-11-02T15:45:08.132336Z"},{"id":"GHSA-g8mr-85jm-7xhm","title":"Vitest Browser: Exposed Browser Mode API Can Proxy CDP and Overwrite Config Files, Leading to RCE","description":"## Summary\n\nVitest 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`.\n\nAs 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.\n\nWhen 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.\n\n## Impact\n\nThis 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`.\n\nIn 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.\n\nThe 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.\n\n## Reproduction\n\nFor a concrete reproduction, start Browser Mode in watch mode using the official Lit example:\n\n```sh\npnpm dlx tiged vitest-dev/vitest/examples/lit vitest-poc\ncd vitest-poc\npnpm install\n```\n\nConfigure the Browser Mode API to listen on all interfaces while explicitly disabling write and exec operations:\n\n```ts\nimport { playwright } from '@vitest/browser-playwright'\nimport { defineConfig } from 'vite'\n\nexport default defineConfig({\n  test: {\n    browser: {\n      enabled: true,\n      provider: playwright(),\n      instances: [\n        { browser: 'chromium' },\n      ],\n      api: {\n        host: '0.0.0.0',\n        allowWrite: false,\n        allowExec: false,\n      },\n    },\n  },\n})\n```\n\nThen start the test server:\n\n```sh\npnpm test\n```\n\nVitest serves the browser runner HTML and WebSocket API at `http://localhost:63315`.\n\nWhile the browser session is active:\n\n1. Fetch the generated browser runner page:\n\n   ```text\n   http://localhost:63315/__vitest_test__/\n   ```\n\n2. Extract the embedded browser API token, active session id, project name, and project root:\n\n   - `window.VITEST_API_TOKEN`\n   - `__vitest_browser_runner__.sessionId`\n   - `__vitest_browser_runner__.config.name`\n   - `__vitest_browser_runner__.config.root`\n\n3. Connect to the browser API WebSocket as a tester client:\n\n   ```text\n   /__vitest_browser_api__?type=tester\u0026rpcId=\u003cfresh-id\u003e\u0026sessionId=\u003csession-id\u003e\u0026projectName=\u003cproject-name\u003e\u0026method=none\u0026token=\u003ctoken\u003e\n   ```\n\n4. Call the `sendCdpEvent` RPC method with:\n\n   ```text\n   Page.setDownloadBehavior({\n     behavior: \"allow\",\n     downloadPath: __vitest_browser_runner__.config.root\n   })\n   ```\n\n5. Call `sendCdpEvent` again with `Runtime.evaluate`. The evaluated JavaScript creates a Blob containing a malicious Vite config and clicks an anchor element `\u003ca download=\"vite.config.ts\"\u003e`.\n\n6. Observed result:\n\n   - `vite.config.ts` is overwritten with attacker-controlled content.\n   - Vitest reloads the changed config.\n   - The injected Node.js payload runs on the host.","status":"published","published":"2026-06-15T20:05:15Z","modified":"2026-08-13T18:30:12.338998545Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-749","CWE-862"],"updated_at":"2026-11-02T15:46:47.472172Z"},{"id":"CLSA-2026-1789901057","title":"TuxCare security update for vitest (2 CVEs)","description":"TuxCare rebuilt vitest to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-09-20T10:44:17Z","modified":"2026-10-15T09:46:02.408841305Z","updated_at":"2026-11-02T15:43:48.28229Z"},{"id":"CLSA-2026-1790459317","title":"TuxCare security update for vitest (1 CVE)","description":"TuxCare rebuilt vitest to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-09-26T21:48:37Z","modified":"2026-10-15T09:47:56.97201545Z","updated_at":"2026-11-02T15:43:48.65893Z"},{"id":"CLSA-2026-1792160942","title":"TuxCare security update for @vitest/browser (1 CVE)","description":"TuxCare rebuilt @vitest/browser to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:28:58Z","modified":"2026-10-16T16:30:36.219044526Z","updated_at":"2026-11-02T15:43:50.949147Z"},{"id":"CLSA-2026-1792160962","title":"TuxCare security update for @vitest/utils (1 CVE)","description":"TuxCare rebuilt @vitest/utils to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:29:18Z","modified":"2026-10-16T16:30:45.731431871Z","updated_at":"2026-11-02T15:43:50.949147Z"},{"id":"CLSA-2026-1792161473","title":"TuxCare security update for @vitest/snapshot (2 CVEs)","description":"TuxCare rebuilt @vitest/snapshot to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:37:53Z","modified":"2026-10-16T16:31:03.626350099Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161477","title":"TuxCare security update for @vitest/snapshot (1 CVE)","description":"TuxCare rebuilt @vitest/snapshot to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:37:57Z","modified":"2026-10-16T16:30:31.35664758Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161574","title":"TuxCare security update for @vitest/browser (2 CVEs)","description":"TuxCare rebuilt @vitest/browser to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:39:34Z","modified":"2026-10-16T16:30:12.033063111Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161608","title":"TuxCare security update for @vitest/browser-playwright (2 CVEs)","description":"TuxCare rebuilt @vitest/browser-playwright to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:40:08Z","modified":"2026-10-16T16:30:09.178436403Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161647","title":"TuxCare security update for @vitest/browser-preview (2 CVEs)","description":"TuxCare rebuilt @vitest/browser-preview to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:40:47Z","modified":"2026-10-16T16:31:12.99855793Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161653","title":"TuxCare security update for @vitest/coverage-istanbul (1 CVE)","description":"TuxCare rebuilt @vitest/coverage-istanbul to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:40:53Z","modified":"2026-10-16T16:31:13.000659388Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161665","title":"TuxCare security update for @vitest/coverage-v8 (1 CVE)","description":"TuxCare rebuilt @vitest/coverage-v8 to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:41:05Z","modified":"2026-10-16T16:31:06.618689678Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161719","title":"TuxCare security update for @vitest/expect (2 CVEs)","description":"TuxCare rebuilt @vitest/expect to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:41:59Z","modified":"2026-10-16T16:31:14.70392377Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161724","title":"TuxCare security update for @vitest/expect (1 CVE)","description":"TuxCare rebuilt @vitest/expect to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:42:04Z","modified":"2026-10-16T16:31:08.233491411Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161766","title":"TuxCare security update for @vitest/mocker (2 CVEs)","description":"TuxCare rebuilt @vitest/mocker to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:42:46Z","modified":"2026-10-16T16:31:29.990393175Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161771","title":"TuxCare security update for @vitest/mocker (1 CVE)","description":"TuxCare rebuilt @vitest/mocker to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:42:51Z","modified":"2026-10-16T16:31:29.622263549Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161831","title":"TuxCare security update for @vitest/pretty-format (2 CVEs)","description":"TuxCare rebuilt @vitest/pretty-format to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:43:51Z","modified":"2026-10-16T16:31:14.956386093Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161834","title":"TuxCare security update for @vitest/pretty-format (1 CVE)","description":"TuxCare rebuilt @vitest/pretty-format to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:43:54Z","modified":"2026-10-16T16:31:09.828550994Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161876","title":"TuxCare security update for @vitest/spy (2 CVEs)","description":"TuxCare rebuilt @vitest/spy to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:44:36Z","modified":"2026-10-16T16:31:16.938712538Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161880","title":"TuxCare security update for @vitest/spy (1 CVE)","description":"TuxCare rebuilt @vitest/spy to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:44:40Z","modified":"2026-10-16T16:31:18.146235383Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161945","title":"TuxCare security update for @vitest/ui (1 CVE)","description":"TuxCare rebuilt @vitest/ui to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:45:45Z","modified":"2026-10-16T16:31:19.262032277Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792161974","title":"TuxCare security update for @vitest/utils (2 CVEs)","description":"TuxCare rebuilt @vitest/utils to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:46:14Z","modified":"2026-10-16T16:31:19.955548901Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792162013","title":"TuxCare security update for @vitest/web-worker (1 CVE)","description":"TuxCare rebuilt @vitest/web-worker to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:46:53Z","modified":"2026-10-16T16:31:21.007895934Z","updated_at":"2026-11-02T15:43:51.213191Z"},{"id":"CLSA-2026-1792162034","title":"TuxCare security update for @vitest/runner (2 CVEs)","description":"TuxCare rebuilt @vitest/runner to address 2 CVEs. Fixed in 4.0.18-tuxcare.2.","status":"published","published":"2026-10-16T14:47:14Z","modified":"2026-10-16T16:31:21.558602024Z","updated_at":"2026-11-02T15:43:51.466048Z"},{"id":"CLSA-2026-1792162039","title":"TuxCare security update for @vitest/runner (1 CVE)","description":"TuxCare rebuilt @vitest/runner to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:47:19Z","modified":"2026-10-16T16:31:41.618050175Z","updated_at":"2026-11-02T15:43:51.466048Z"},{"id":"CLSA-2026-1792162063","title":"TuxCare security update for @vitest/ws-client (1 CVE)","description":"TuxCare rebuilt @vitest/ws-client to address 1 CVE. Fixed in 3.2.4-tuxcare.4.","status":"published","published":"2026-10-16T14:47:43Z","modified":"2026-10-16T16:31:42.421679544Z","updated_at":"2026-11-02T15:43:51.466048Z"}]}}
