{"id":"GHSA-v2wj-q39q-566r","revision":"83f43c7d58774c0a95f7e705dbd04875","records":[{"revision":"83f43c7d58774c0a95f7e705dbd04875","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-v2wj-q39q-566r","aliases":["CVE-2026-39364"],"title":"Vite: `server.fs.deny` bypassed with queries","description":"### Summary\n\nThe contents of files that are specified by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny) can be returned to the browser.\n\n### Impact\n\nOnly apps that match the following conditions are affected:\n\n- explicitly exposes the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host))\n- the sensitive file exists in the allowed directories specified by [`server.fs.allow`](https://vite.dev/config/server-options#server-fs-allow)\n- the sensitive file is denied with a pattern that matches a file by [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny)\n\n### Details\n\nOn 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&inline` are appended.\n\n### PoC\n\n1. Start the dev server: `pnpm exec vite root --host 127.0.0.1 --port 5175 --strictPort`\n2. Confirm that `server.fs.deny` is enforced (expect 403): `curl -i http://127.0.0.1:5175/src/.env | head -n 20`\n   <img width=\"3944\" height=\"1092\" alt=\"image\" src=\"https://github.com/user-attachments/assets/ecb9f2e0-e08f-4ac7-b194-e0f988c4cd4f\" />\n3. Confirm that the same files can be retrieved with query parameters (expect 200):\n   <img width=\"2014\" height=\"373\" alt=\"image\" src=\"https://github.com/user-attachments/assets/76bc2a6a-44f4-4161-ae47-eab5ae0c04a8\" />","state":0,"publishedAt":"2026-04-06T18:03:32+00:00","modifiedAt":"2026-09-10T03:50:44.7801289+00:00","affected":[{"ecosystem":"npm","name":"vite","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"8.0.0"},{"kind":"fixed","version":"8.0.5"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vite","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"7.1.0"},{"kind":"fixed","version":"7.3.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r","https://nvd.nist.gov/vuln/detail/CVE-2026-39364","https://github.com/vitejs/vite/pull/22160","https://github.com/vitejs/vite/commit/a9a3df299378d9cbc5f069e3536a369f8188c8ff","https://github.com/vitejs/vite","https://github.com/vitejs/vite/releases/tag/v7.3.2","https://github.com/vitejs/vite/releases/tag/v8.0.5"],"sourceUrl":"https://github.com/advisories/GHSA-v2wj-q39q-566r","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-v2wj-q39q-566r","identifiers":["GHSA-v2wj-q39q-566r","CVE-2026-39364"]},"retained":false,"historicalAffected":[]}],"coverage":[]}