{"id":"CVE-2025-58752","published":"2025-09-08T22:56:58Z","modified":"2025-09-09T13:29:30Z","title":"Vite's `server.fs` settings were not applied to HTML files","vendor":"vitejs","product":"vite","tier":"tail","description":{"text":"Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, any HTML files on the machine were served regardless of the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or server.host config option) and use `appType: 'spa'` (default) or `appType: 'mpa'` are affected. This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.3,"severity":"LOW","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00608,"percentile":0.49098,"provenance":"source"},"cwes":[{"id":"CWE-23","name":"Relative Path Traversal"},{"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-jqfw-vq24-v9c3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/482000f57f56fe6ff2e905305100cfe03043ddea","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/6f01ff4fe072bcfcd4e2a84811772b818cd51fe6","tags":["x_refsource_MISC"]}],"priority":{"score":11.4,"factors":[{"name":"EPSS percentile","points":9.82},{"name":"CVSS severity","points":1.61}]},"vendorSlug":"vitejs","affectedVersions":[{"vendor":"vitejs","product":"vite","versions":["< 5.4.20",">= 6.0.0, < 6.3.6",">= 7.0.0, < 7.0.7",">= 7.1.0, < 7.1.5"]}],"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":[">=7.1.0, <7.1.5",">=7.0.0, <7.0.7",">=6.0.0, <6.3.6","<5.4.20"],"patched":["7.1.5","7.0.7","6.3.6","5.4.20"],"from":["GHSA-jqfw-vq24-v9c3"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-27180","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-vitejs-vite-cve-2022-35204","parents":[{"from":"CVE-2024-31207","to":"CVE-2025-58752","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/011bbca350e447d1b499d242804ce62738c12bc0","https://github.com/vitejs/vite/commit/5a056dd2fc80dbafed033062fe6aaf4717309f48","https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f","https://github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e"],"basis":"shared function","functions":["isFileServingAllowed"]}]},{"from":"CVE-2024-45811","to":"CVE-2025-58752","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/static.ts","playground/fs-serve/root/src/index.html"],"commits":["https://github.com/vitejs/vite/commit/6820bb3b9a54334f3268fc5ee1e967d2e1c0db34","https://github.com/vitejs/vite/commit/4573a6fd6f1b097fb7296a3e135e0646b996b249","https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f","https://github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e"],"basis":"shared function","functions":["isFileServingAllowed"]}]}],"packageHistory":[{"cve":"CVE-2025-46565","published":"2025-05-01","fixed":"6.3.4","kev":false,"link":{"from":"CVE-2025-46565","to":"CVE-2025-58752","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"6.3.4","toFixed":"6.3.6","daysApart":130},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"5.4.19","toFixed":"5.4.20","daysApart":130},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/static.ts"],"commits":["https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb","https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f","https://github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e"],"basis":"shared file"}]}},{"cve":"CVE-2026-118662","published":"2026-10-28","fixed":"6.4.5","kev":false},{"cve":"CVE-2025-58751","published":"2025-09-08","fixed":"7.1.5","kev":false},{"cve":"CVE-2025-58752","published":"2025-09-08","fixed":"7.1.5","kev":false},{"cve":"CVE-2025-62522","published":"2025-10-20","fixed":"7.1.11","kev":false,"link":{"from":"CVE-2025-58752","to":"CVE-2025-62522","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"7.1.5","toFixed":"7.1.11","daysApart":42},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"6.3.6","toFixed":"6.4.1","daysApart":42},{"kind":"same-code","provenance":"machine","files":["packages/vite/src/node/server/middlewares/static.ts"],"commits":["https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f","https://github.com/vitejs/vite/commit/14015d794f69accba68798bd0e15135bc51c9c1e","https://github.com/vitejs/vite/commit/f479cc57c425ed41ceb434fecebd63931b1ed4ed"],"basis":"shared file"}]}},{"cve":"CVE-2026-39363","published":"2026-04-07","fixed":"8.0.5","kev":false},{"cve":"CVE-2026-39364","published":"2026-04-07","fixed":"8.0.5","kev":false}],"package":"npm:vite"}}