{"id":"CVE-2026-118662","aliases":["GHSA-8g5g-mxqh-grgj"],"url":"https://o3.security/vulnerability/CVE-2026-118662","summary":"Vite: `server.fs.deny` bypassed 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. This is the same as https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r.\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\nFor the fix for https://github.com/vitejs/vite/security/advisories/GHSA-rq7h-c2jc-7f22, v6.4.4 back-ported https://github.com/vitejs/vite/pull/20410. But while that PR requires https://github.com/vitejs/vite/pull/22160 for https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r, https://github.com/vitejs/vite/pull/22160 wasn't back-ported together causing v6 vulnerable to https://github.com/vitejs/vite/security/advisories/GHSA-v2wj-q39q-566r.","published":"2026-10-28T20:33:36.440Z","modified":"2026-10-31T02:30:22.335421897Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"npm","name":"vite","fixedVersion":"6.4.5"}],"fix":{"url":"https://github.com/vitejs/vite/commit/91e40d7bf9777057bbd31c3eb036a54c9465697e","label":"vitejs/vite@91e40d7"},"references":[{"type":"WEB","url":"https://github.com/vitejs/vite/releases/tag/v6.4.5"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/118xxx/CVE-2026-118662.json"},{"type":"ADVISORY","url":"https://github.com/vitejs/vite/security/advisories/GHSA-8g5g-mxqh-grgj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118662"},{"type":"FIX","url":"https://github.com/vitejs/vite/commit/91e40d7bf9777057bbd31c3eb036a54c9465697e"},{"type":"FIX","url":"https://github.com/vitejs/vite/pull/22160"},{"type":"FIX","url":"https://github.com/vitejs/vite/pull/23855"},{"type":"PACKAGE","url":"https://github.com/vitejs/vite"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-31T02:30:22.335421897Z"}}