{"id":"CVE-2026-47429","published":"2026-07-14T19:28:08Z","modified":"2026-07-21T15:02:17Z","title":"Vitest: Arbitrary file can be read and executed when Vitest UI server is listening","vendor":"vitest-dev","product":"vitest","tier":"tail","description":{"text":"Vitest is a testing framework powered by Vite. Prior to 3.2.5 and 4.1.0, the Vitest UI/API server on Windows used isFileServingAllowed incorrectly for /__vitest_attachment__, allowing \\\\?\\\\..\\\\ path traversal to read files outside the project; exposed API write and rerun features such as saveTestFile and rerun could also allow arbitrary script execution. This issue is fixed in versions 3.2.5 and 4.1.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01028,"percentile":0.6448,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/vitest-dev/vitest/security/advisories/GHSA-5xrq-8626-4rwp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitest-dev/vitest/pull/10445","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/pull/9350","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda530f686e08f1c8d","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a977156c98e2b14ca8","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v3.2.5","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v4.1.0","tags":["x_refsource_MISC"]}],"priority":{"score":24.8,"factors":[{"name":"EPSS percentile","points":12.9},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.86}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-06-09","earliestUrl":"https://github.com/az9713/cve-lite-on-pi","repos":[{"name":"az9713/cve-lite-on-pi","url":"https://github.com/az9713/cve-lite-on-pi","stars":0,"created":"2026-06-09"}]},"first":{"date":"2026-06-09","source":"PoC-in-GitHub","url":"https://github.com/az9713/cve-lite-on-pi"},"provenance":"source"},"vendorSlug":"vitest-dev","affectedVersions":[{"vendor":"vitest-dev","product":"vitest","versions":["< 3.2.5",">= 4.0.0, < 4.1.0"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-07-21T15:02:06.439415Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"vitest","vulnerableRanges":[">=4.0.0, <4.1.0","<3.2.6"],"patched":["4.1.0","3.2.6"],"from":["GHSA-5xrq-8626-4rwp"],"provenance":"source"}],"summary":{"text":"The flaw is a path traversal and unsafe API exposure in the Vitest testing framework's UI/API server, which runs on Windows, where the file-serving check used for the /__vitest_attachment__ endpoint can be bypassed with a \\\\?\\..\\ style path. The product affected is vitest, in its UI/API server component. An attacker with network access to a listening Vitest UI server, and no authentication or user interaction, can read files outside the project directory and, through the exposed write and rerun features, potentially execute arbitrary scripts.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T15:01:55Z"},"euvd":{"id":"EUVD-2026-44391","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-vitest-dev-vitest-cve-2025-24963","parents":[{"from":"CVE-2025-24964","to":"CVE-2026-47429","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vitest","fromFixed":"3.0.5","toFixed":"3.2.6","daysApart":525},{"kind":"same-code","provenance":"machine","files":["packages/vitest/src/api/setup.ts","packages/vitest/src/node/types/config.ts"],"commits":["https://github.com/vitest-dev/vitest/commit/191ef9e34c867d0efd04f49b3d38193a68e825dc","https://github.com/vitest-dev/vitest/commit/7ce9fbb4972d45c6fd34c843645ef6f549bbb241","https://github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda530f686e08f1c8d","https://github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a977156c98e2b14ca8"],"basis":"shared function","functions":["setup"]}]},{"from":"CVE-2025-24963","to":"CVE-2026-47429","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/browser/src/node/plugin.ts","packages/ui/client/components/views/ViewReport.vue"],"commits":["https://github.com/vitest-dev/vitest/commit/2d62051f13b4b0939b2f7e94e88006d830dc4d1f","https://github.com/vitest-dev/vitest/commit/ed9aeba212df04b83ed01810780663ff2cdd0adf","https://github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda530f686e08f1c8d","https://github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a977156c98e2b14ca8"],"basis":"shared function","functions":["default"]}]}],"children":[{"from":"CVE-2026-47429","to":"CVE-2026-73653","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/browser/src/node/commands/fs.ts"],"commits":["https://github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda530f686e08f1c8d","https://github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a977156c98e2b14ca8","https://github.com/vitest-dev/vitest/commit/33f96a145ef09ca6a43b4e555eb273e64a87be23","https://github.com/vitest-dev/vitest/commit/5c18dd267ff7f47f24cab2f615a16b37d90feb7f"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2025-24964","published":"2025-02-04","fixed":"3.0.5","kev":false},{"cve":"CVE-2026-47429","published":"2026-07-14","fixed":"4.1.0","kev":false},{"cve":"CVE-2026-84373","published":"2026-09-01","fixed":"5.0.0-rc.2","kev":false,"link":{"from":"CVE-2026-47429","to":"CVE-2026-84373","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vitest","fromFixed":"4.1.0","toFixed":"4.1.11","daysApart":49},{"kind":"same-code","provenance":"machine","files":["packages/browser/src/node/rpc.ts"],"commits":["https://github.com/vitest-dev/vitest/commit/20e00ef7808de6d330c5e2fda530f686e08f1c8d","https://github.com/vitest-dev/vitest/commit/af88b1f5d82844a4761ea9a977156c98e2b14ca8","https://github.com/vitest-dev/vitest/commit/51edf2b072902aec6d30c90ebaafd8f121c6f9d8","https://github.com/vitest-dev/vitest/commit/8ff9b9a9efca7c6cfd5243569440de8d7a33aec4"],"basis":"shared file"}]}}],"package":"npm:vitest"}}