Vite: `server.fs.deny` bypassed with queries
Description
Published by the National Vulnerability Database
Oct 28, 2026
Published to the GitHub Advisory Database
Oct 29, 2026
Reviewed
Oct 29, 2026
Last updated
Oct 29, 2026
Summary
The contents of files that are specified by
server.fs.denycan be returned to the browser. This is the same as GHSA-v2wj-q39q-566r.Impact
Only apps that match the following conditions are affected:
--hostorserver.hostconfig option)server.fs.allowserver.fs.denyDetails
On the Vite dev server, files that should be blocked by
server.fs.deny(e.g.,.env,*.crt) can be retrieved with HTTP 200 responses when query parameters such as?raw,?import&raw, or?import&url&inlineare appended.For the fix for GHSA-rq7h-c2jc-7f22, v6.4.4 back-ported vitejs/vite#20410. But while that PR requires vitejs/vite#22160 for GHSA-v2wj-q39q-566r, vitejs/vite#22160 wasn't back-ported together causing v6 vulnerable to GHSA-v2wj-q39q-566r.
References