{"id":"CVE-2026-39364","aliases":["GHSA-v2wj-q39q-566r"],"url":"https://o3.security/vulnerability/CVE-2026-39364","summary":"Vite has a `server.fs.deny` bypass with queries","details":"### 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\" />","published":"2026-04-07T19:12:47.577Z","modified":"2026-11-04T10:46:40.799824387Z","cvss":null,"epss":{"score":0.02095,"percentile":0.80229,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"vite","fixedVersion":"8.0.5"},{"ecosystem":"npm","name":"vite","fixedVersion":"7.3.2"}],"fix":{"url":"https://github.com/vitejs/vite/pull/22160","label":"vitejs/vite#22160"},"references":[{"type":"WEB","url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39364.json"},{"type":"ADVISORY","url":"https://access.redhat.com/errata/RHSA-2026:24866"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2026-39364"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39364.json"},{"type":"ADVISORY","url":"https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-39364"},{"type":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2456181"},{"type":"WEB","url":"https://github.com/vitejs/vite/pull/22160"},{"type":"WEB","url":"https://github.com/vitejs/vite/commit/a9a3df299378d9cbc5f069e3536a369f8188c8ff"},{"type":"PACKAGE","url":"https://github.com/vitejs/vite"},{"type":"WEB","url":"https://github.com/vitejs/vite/releases/tag/v7.3.2"},{"type":"WEB","url":"https://github.com/vitejs/vite/releases/tag/v8.0.5"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-11-04T10:46:40.799824387Z"}}