{"id":"CVE-2026-112948","published":"2026-10-20T15:15:01Z","modified":"2026-10-20T16:16:59Z","title":"Vitest: Servers misapply `server.fs.deny`, serving `.env`, private keys, `.git`, and the API token file","vendor":"vitest-dev","product":"vitest","tier":"tail","description":{"text":"Vitest is a testing framework powered by Vite. From 5.0.0-beta.6 until 5.0.5, Vitest dev servers can misapply server.fs.deny because project servers replace Vite's defaults and the root server adds .vitest-secret-token after Vite compiles its matcher. An attacker who can reach an affected UI, Browser Mode, or API server can read denied project files or the fallback API token at node_modules/.vitest/.vitest-secret-token, and Browser Mode with test.projects can expose JavaScript-compatible .env values through a malicious website. This issue is fixed in version 5.0.5.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00461,"percentile":0.31979,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-552","name":"Files or Directories Accessible to External Parties"}],"references":[{"url":"https://github.com/vitest-dev/vitest/security/advisories/GHSA-p458-7748-mcp3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitest-dev/vitest/pull/11578","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/commit/28dc1edfb6ba5a181fe208576989063795aeadb3","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitest-dev/vitest/releases/tag/v5.0.5","tags":["x_refsource_MISC"]}],"priority":{"score":10.9,"factors":[{"name":"EPSS percentile","points":6.4},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"vitest-dev","affectedVersions":[{"vendor":"vitest-dev","product":"vitest","versions":[">= 5.0.0-beta.6, < 5.0.5"]},{"vendor":"@vitest","product":"browser","versions":[">= 5.0.0-beta.6, < 5.0.5"]},{"vendor":"@vitest","product":"ui","versions":[">= 5.0.0-beta.6, < 5.0.5"]},{"vendor":"vitejs","product":"vite-plus","versions":[">= 1.0.0-rc.0, < 1.3.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-20T16:16:51.150771Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@vitest/ui","vulnerableRanges":[">=5.0.0-beta.6, <5.0.5"],"patched":["5.0.5"],"from":["GHSA-p458-7748-mcp3"],"provenance":"source"},{"ecosystem":"npm","package":"@vitest/browser","vulnerableRanges":[">=5.0.0-beta.6, <5.0.5"],"patched":["5.0.5"],"from":["GHSA-p458-7748-mcp3"],"provenance":"source"},{"ecosystem":"npm","package":"vite-plus","vulnerableRanges":[">=1.0.0-rc.0, <1.3.0"],"patched":["1.3.0"],"from":["GHSA-p458-7748-mcp3"],"provenance":"source"}],"summary":{"text":"Vitest (vitest-dev/vitest) from 5.0.0-beta.6 until 5.0.5 misapplies its server.fs.deny setting, because project servers replace Vite's default deny list and the root server adds the API token file after Vite has already compiled its matcher, so denied files such as .env, private keys, .git, and node_modules/.vitest/.vitest-secret-token can be served. An attacker who can reach an affected UI, Browser Mode, or API server can read these files, and where test.projects is used with Browser Mode, a malicious website visited by the user can expose JavaScript-compatible .env values.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:55:14Z"},"euvd":{"id":"EUVD-2026-105143","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-47428","published":"2026-07-14","fixed":"5.0.0-beta.3","kev":false},{"cve":"CVE-2026-53633","published":"2026-07-14","fixed":"5.0.0-beta.4","kev":false},{"cve":"CVE-2026-73653","published":"2026-08-13","fixed":"5.0.0-beta.6","kev":false,"link":{"from":"CVE-2026-73653","to":"CVE-2026-112948","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@vitest/browser","fromFixed":"5.0.0-beta.6","toFixed":"5.0.5","daysApart":68}]}},{"cve":"CVE-2026-112948","published":"2026-10-20","fixed":"5.0.5","kev":false}],"package":"npm:@vitest/browser"}}