{"id":"CVE-2026-53633","revision":null,"records":[{"revision":"d8d18f91682f40e4a673446e6c904037","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-53633","aliases":[],"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.","state":0,"publishedAt":"2026-07-14T19:35:42.739+00:00","modifiedAt":"2026-07-29T18:26:18.528+00:00","affected":[{"ecosystem":"Vendor product","name":"vitest","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"vitest-dev\",\n                    \"product\": \"vitest\",\n                    \"versions\": [\n                        {\n                            \"version\": \">= 3.0.0, < 3.2.5\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 4.0.0, < 4.1.8\",\n                            \"status\": \"affected\"\n                        },\n                        {\n                            \"version\": \">= 5.0.0-beta.0, < 5.0.0-beta.4\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/vitest-dev/vitest/security/advisories/GHSA-g8mr-85jm-7xhm","https://github.com/vitest-dev/vitest/pull/10444","https://github.com/vitest-dev/vitest/pull/10450","https://github.com/vitest-dev/vitest/pull/10456","https://github.com/vitest-dev/vitest/commit/385a1aefd4c2bfa5e7d58bf7c6834c929969f2c7","https://github.com/vitest-dev/vitest/commit/63e3b2eee4d58da56786a6333f517b9b492528c7","https://github.com/vitest-dev/vitest/commit/e4067b3b150005fd42cf75f994300119245806b9","https://github.com/vitest-dev/vitest/releases/tag/v3.2.5","https://github.com/vitest-dev/vitest/releases/tag/v4.1.8","https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.4"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-53633","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-53633","identifiers":["CVE-2026-53633"]},"retained":false,"historicalAffected":[]},{"revision":"23f6814214744c4997b118fdd8111105","observedAt":"2026-10-25T13:17:16.273+00:00","statement":{"source":"nvd","id":"CVE-2026-53633","aliases":[],"title":"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, allo…","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.","state":0,"publishedAt":"2026-07-14T20:17:42.173+00:00","modifiedAt":"2026-10-24T21:10:00.13+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"severity":"CRITICAL"}],"references":["https://github.com/vitest-dev/vitest/commit/385a1aefd4c2bfa5e7d58bf7c6834c929969f2c7","https://github.com/vitest-dev/vitest/commit/63e3b2eee4d58da56786a6333f517b9b492528c7","https://github.com/vitest-dev/vitest/commit/e4067b3b150005fd42cf75f994300119245806b9","https://github.com/vitest-dev/vitest/pull/10444","https://github.com/vitest-dev/vitest/pull/10450","https://github.com/vitest-dev/vitest/pull/10456","https://github.com/vitest-dev/vitest/releases/tag/v3.2.5","https://github.com/vitest-dev/vitest/releases/tag/v4.1.8","https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.4","https://github.com/vitest-dev/vitest/security/advisories/GHSA-g8mr-85jm-7xhm"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-53633","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Awaiting Analysis","weaknesses":["CWE-749","CWE-862"],"productCriteria":[],"sourceDates":{"published":"2026-07-14T20:17:42.173","lastModified":"2026-10-24T21:10:00.130"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-53633","identifiers":["CVE-2026-53633"]},"retained":false,"historicalAffected":[]},{"revision":"331f97c44dce43f0ac544e632d83e94d","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-g8mr-85jm-7xhm","aliases":["CVE-2026-53633"],"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&rpcId=<fresh-id>&sessionId=<session-id>&projectName=<project-name>&method=none&token=<token>\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 `<a download=\"vite.config.ts\">`.\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.","state":0,"publishedAt":"2026-06-15T20:05:15+00:00","modifiedAt":"2026-08-13T18:30:12.3389985+00:00","affected":[{"ecosystem":"npm","name":"@vitest/browser","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.0.0-beta.0"},{"kind":"fixed","version":"5.0.0-beta.4"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@vitest/browser","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"4.0.0"},{"kind":"fixed","version":"4.1.8"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"@vitest/browser","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"3.0.0"},{"kind":"fixed","version":"3.2.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vite-plus","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.1.24"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"CRITICAL"}],"references":["https://github.com/vitest-dev/vitest/security/advisories/GHSA-g8mr-85jm-7xhm","https://nvd.nist.gov/vuln/detail/CVE-2026-53633","https://github.com/vitest-dev/vitest/pull/10444","https://github.com/vitest-dev/vitest/pull/10450","https://github.com/vitest-dev/vitest/pull/10456","https://github.com/vitest-dev/vitest/commit/385a1aefd4c2bfa5e7d58bf7c6834c929969f2c7","https://github.com/vitest-dev/vitest/commit/63e3b2eee4d58da56786a6333f517b9b492528c7","https://github.com/vitest-dev/vitest/commit/e4067b3b150005fd42cf75f994300119245806b9","https://github.com/vitest-dev/vitest","https://github.com/vitest-dev/vitest/releases/tag/v3.2.5","https://github.com/vitest-dev/vitest/releases/tag/v4.1.8","https://github.com/vitest-dev/vitest/releases/tag/v5.0.0-beta.4"],"sourceUrl":"https://github.com/advisories/GHSA-g8mr-85jm-7xhm","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-g8mr-85jm-7xhm","identifiers":["GHSA-g8mr-85jm-7xhm","CVE-2026-53633"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-27T03:23:00.5555620+00:00","complete":true,"records":1758,"lastAttemptAt":"2026-10-27T03:23:00.555562+00:00","lastSuccessAt":"2026-10-27T03:23:00.6986702+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:23:00.6986732+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-187d2b72c94ceb8c4417f1032ec3109a3a3a7b730abadb561d8cdd2a96e04d27-57af8b9cb8b3567e0ff1c465b55549984a63d39a842292251efe141cd38b38c5","complete":true,"records":414860,"lastAttemptAt":"2026-10-27T04:22:56.0335839+00:00","lastSuccessAt":"2026-10-27T03:22:59.8407535+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:22:59.8670088+00:00","snapshotPublishedAt":"2026-10-27T02:35:43+00:00","importing":true,"stagedRecords":88,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-43321610382942b8ad8c85917eab1546","complete":false,"records":4735,"lastAttemptAt":"2026-10-27T03:23:28.43141+00:00","lastSuccessAt":"2026-10-24T23:18:49.862+00:00","error":"InvalidDataException","lastVerifiedAt":"2026-10-24T23:18:49.862+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":0,"expectedIdentifiers":13477},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-27T03:23:00.5555620+00:00","complete":true,"records":1093,"lastAttemptAt":"2026-10-27T03:23:00.555562+00:00","lastSuccessAt":"2026-10-27T03:23:00.6994805+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:23:00.699481+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-0359020e244b476eb2e837e8432b1f32","complete":false,"records":13416,"lastAttemptAt":"2026-10-27T03:23:26.5209764+00:00","lastSuccessAt":"2026-10-27T03:23:26.517+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:23:26.517+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13077,"expectedIdentifiers":13477},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-c3121b113ecd88f1c92ccfa0ec9757ddc8386e4c12afd2597450b815744f800a","complete":true,"records":9779,"lastAttemptAt":"2026-10-27T03:23:00.5062933+00:00","lastSuccessAt":"2026-10-26T15:37:14.3083004+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:23:00.5062933+00:00","snapshotPublishedAt":"2026-10-26T14:48:41+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-bad5d31e7f6a5e3d338e11d8789069b63620a403f927730769688b42f768e4f6","complete":true,"records":1965,"lastAttemptAt":"2026-10-27T03:22:59.9290096+00:00","lastSuccessAt":"2026-10-26T16:35:43.1460623+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:22:59.9290096+00:00","snapshotPublishedAt":"2026-10-26T16:18:29+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-a393d8fe0ae8408f3e4cab413b76047090c8e4a3c0a186c79edf33c9a3d3af95","complete":true,"records":2995,"lastAttemptAt":"2026-10-27T03:23:00.5277541+00:00","lastSuccessAt":"2026-10-26T14:35:47.9640893+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:23:00.5277541+00:00","snapshotPublishedAt":"2026-10-26T14:18:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-2c2579bb03487537529e2b647fd2d9950cfc0fec1a9832dba33e322b8dcbe369","complete":true,"records":230812,"lastAttemptAt":"2026-10-27T03:23:00.4041305+00:00","lastSuccessAt":"2026-10-26T21:37:26.5810298+00:00","error":null,"lastVerifiedAt":"2026-10-27T03:23:00.4041305+00:00","snapshotPublishedAt":"2026-10-26T21:33:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null}]}