{"id":"CVE-2023-34092","published":"2023-06-01T16:29:51Z","modified":"2025-01-08T21:13:20Z","title":"Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)","vendor":"vitejs","product":"vite","tier":"tail","description":{"text":"Vite provides frontend tooling. Prior to versions 2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, and 4.3.9, Vite Server Options (`server.fs.deny`) can be bypassed using double forward-slash (//) allows any unauthenticated user to read file from the Vite root-path of the application including the default `fs.deny` settings (`['.env', '.env.*', '*.{crt,pem}']`). Only users explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected, and only files in the immediate Vite project root folder could be exposed. This issue is fixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5, vite@3.2.7, and vite@2.9.16.","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.03152,"percentile":0.87936,"provenance":"source"},"cwes":[{"id":"CWE-50","name":"Path Equivalence: '//multiple/leading/slash'"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-353f-5xf4-qw67","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitejs/vite/pull/13348","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/813ddd6155c3d54801e264ba832d8347f6f66b32","tags":["x_refsource_MISC"]}],"priority":{"score":27.8,"factors":[{"name":"EPSS percentile","points":17.59},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"nuclei":[{"id":"CVE-2023-34092","name":"Vite Dev Server - Information Exposure","severity":"high","path":"http/cves/2023/CVE-2023-34092.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-34092.yaml"}],"provenance":"source"},"vendorSlug":"vitejs","affectedVersions":[{"vendor":"vitejs","product":"vite","versions":["< 2.9.16",">= 3.0.2, < 3.2.7",">= 4.0.0, < 4.0.5",">= 4.1.0, < 4.1.5",">= 4.2.0, < 4.2.3",">= 4.3.0, < 4.3.9"]}],"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":["<2.9.16",">=3.0.2, <3.2.7",">=4.0.0, <4.0.5",">=4.1.0, <4.1.5",">=4.2.0, <4.2.3",">=4.3.0, <4.3.9"],"patched":["2.9.16","3.2.7","4.0.5","4.1.5","4.2.3","4.3.9"],"from":["GHSA-353f-5xf4-qw67"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-1665","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-vitejs-vite-cve-2022-35204","parents":[{"from":"CVE-2022-35204","to":"CVE-2023-34092","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"2.9.13","toFixed":"2.9.16","daysApart":287},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/static.ts"],"commits":["https://github.com/vitejs/vite/commit/6851009e6725b17608113a5a63474280075cae1c","https://github.com/vitejs/vite/commit/e109d64331d9fa57753832762c3573c3532a6947","https://github.com/vitejs/vite/commit/813ddd6155c3d54801e264ba832d8347f6f66b32"],"basis":"shared function","functions":["serveRawFsMiddleware","serveStaticMiddleware"]}]}],"children":[{"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-2023-34092","to":"CVE-2024-31207","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/813ddd6155c3d54801e264ba832d8347f6f66b32","https://github.com/vitejs/vite/commit/011bbca350e447d1b499d242804ce62738c12bc0","https://github.com/vitejs/vite/commit/5a056dd2fc80dbafed033062fe6aaf4717309f48"],"basis":"shared function","functions":["serveRawFsMiddleware"]}]},{"from":"CVE-2023-34092","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/813ddd6155c3d54801e264ba832d8347f6f66b32","https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb"],"basis":"shared function","functions":["serveRawFsMiddleware","serveStaticMiddleware"]}]}],"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},{"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}],"package":"npm:vite"}}