{"id":"CVE-2024-23331","published":"2024-01-19T19:43:17Z","modified":"2025-06-17T21:19:25Z","title":"Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem","vendor":"vitejs","product":"vite","tier":"tail","description":{"text":"Vite is a frontend tooling framework for javascript. The Vite dev server option `server.fs.deny` can be bypassed on case-insensitive file systems using case-augmented versions of filenames. Notably this affects servers hosted on Windows. This bypass is similar to CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems. Since `picomatch` defaults to case-sensitive glob matching, but the file server doesn't discriminate; a blacklist bypass is possible. By requesting raw filesystem paths using augmented casing, the matcher derived from `config.server.fs.deny` fails to block access to sensitive files. This issue has been addressed in vite@5.0.12, vite@4.5.2, vite@3.2.8, and vite@2.9.17. Users are advised to upgrade. Users unable to upgrade should restrict access to dev servers.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00785,"percentile":0.56034,"provenance":"source"},"cwes":[{"id":"CWE-178","name":"Improper Handling of Case Sensitivity"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-284","name":"Improper Access Control"}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-c24v-8rfc-w8vw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5","tags":["x_refsource_MISC"]},{"url":"https://vitejs.dev/config/server-options.html#server-fs-deny","tags":["x_refsource_MISC"]}],"priority":{"score":16.5,"factors":[{"name":"EPSS percentile","points":11.21},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"vitejs","affectedVersions":[{"vendor":"vitejs","product":"vite","versions":[">=2.7.0, < 2.9.17",">=3.0.0, <3.2.8",">=4.0.0, < 4.5.2",">=5.0.0, < 5.0.12"]}],"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":[">=2.7.0, <2.9.17",">=3.0.0, <3.2.8",">=4.0.0, <4.5.2",">=5.0.0, <5.0.12"],"patched":["2.9.17","3.2.8","4.5.2","5.0.12"],"from":["GHSA-c24v-8rfc-w8vw"],"provenance":"source"}],"euvd":{"id":"EUVD-2024-0322","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-vitejs-vite-cve-2022-35204","parents":[{"from":"CVE-2023-34092","to":"CVE-2024-23331","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"related","quote":"This bypass is similar to CVE-2023-34092 -- with surface area reduced to hosts having case-insensitive filesystems.","from":"CVE.org","in":"CVE-2024-23331"},{"kind":"osv-related","provenance":"source","id":"GHSA-c24v-8rfc-w8vw","via":"reference","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-34092"},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"2.9.16","toFixed":"2.9.17","daysApart":232},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"3.2.7","toFixed":"3.2.8","daysApart":232},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/static.ts"],"commits":["https://github.com/vitejs/vite/commit/813ddd6155c3d54801e264ba832d8347f6f66b32","https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5","https://github.com/vitejs/vite/commit/0cd769c279724cf27934b1270fbdd45d68217691"],"basis":"shared function","functions":["serveRawFsMiddleware"]}]},{"from":"CVE-2022-35204","to":"CVE-2024-23331","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/6851009e6725b17608113a5a63474280075cae1c","https://github.com/vitejs/vite/commit/e109d64331d9fa57753832762c3573c3532a6947","https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5","https://github.com/vitejs/vite/commit/0cd769c279724cf27934b1270fbdd45d68217691"],"basis":"shared function","functions":["serveRawFsMiddleware"]}]}],"children":[{"from":"CVE-2024-23331","to":"CVE-2024-31207","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"2.9.17","toFixed":"2.9.18","daysApart":76},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"3.2.8","toFixed":"3.2.10","daysApart":76},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/index.ts"],"commits":["https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5","https://github.com/vitejs/vite/commit/0cd769c279724cf27934b1270fbdd45d68217691","https://github.com/vitejs/vite/commit/011bbca350e447d1b499d242804ce62738c12bc0","https://github.com/vitejs/vite/commit/5a056dd2fc80dbafed033062fe6aaf4717309f48"],"basis":"shared function","functions":["_createServer","serveRawFsMiddleware"]}]},{"from":"CVE-2024-23331","to":"CVE-2025-32395","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/index.ts"],"commits":["https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5","https://github.com/vitejs/vite/commit/0cd769c279724cf27934b1270fbdd45d68217691","https://github.com/vitejs/vite/commit/175a83909f02d3b554452a7bd02b9f340cdfef70"],"basis":"shared function","functions":["_createServer"]}]},{"from":"CVE-2024-23331","to":"CVE-2025-46565","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/static.ts"],"commits":["https://github.com/vitejs/vite/commit/91641c4da0a011d4c5352e88fc68389d4e1289a5","https://github.com/vitejs/vite/commit/0cd769c279724cf27934b1270fbdd45d68217691","https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb"],"basis":"shared function","functions":["serveRawFsMiddleware"]}]}],"packageHistory":[{"cve":"CVE-2022-35204","published":"2022-08-18","fixed":"3.0.0-beta.4","kev":false},{"cve":"CVE-2023-34092","published":"2023-06-01","fixed":"4.3.9","kev":false},{"cve":"CVE-2023-49293","published":"2023-12-04","fixed":"5.0.5","kev":false,"link":{"from":"CVE-2023-49293","to":"CVE-2024-23331","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"4.5.1","toFixed":"4.5.2","daysApart":46},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"5.0.5","toFixed":"5.0.12","daysApart":46}]}},{"cve":"CVE-2024-23331","published":"2024-01-19","fixed":"5.0.12","kev":false},{"cve":"CVE-2024-31207","published":"2024-04-04","fixed":"5.2.6","kev":false},{"cve":"CVE-2024-45811","published":"2024-09-17","fixed":"5.4.6","kev":false},{"cve":"CVE-2024-45812","published":"2024-09-17","fixed":"5.4.6","kev":false}],"package":"npm:vite"}}