npm
CVE-2026-118662
Vite: `server.fs.deny` bypassed with queries
- Severity
- Medium
- Published
- 29 Oct 2026
- Last changed
- 29 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 6.4.5
- Exploit chance
- 0.3% in the next 30 daysHigher than 22% of CVEs. EPSS by FIRST, 24 Nov 2026
- Also known as
- GHSA-8g5g-mxqh-grgj
- Sources
- OSV.dev and GitHub
Description
The contents of files that are specified by 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.
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using --host or server.host config option)
- the sensitive file exists in the allowed directories specified by server.fs.allow
- the sensitive file is denied with a pattern that matches a file by server.fs.deny
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&inline are appended.
For 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.
Affected software
| Software | Affected versions |
|---|---|
vitenpm · osv:npm:vite |
|
About vite
- Weekly downloads (npm)
- 287,894,425npm, 23 Nov 2026
This is the only vulnerability in vite in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-118662
- GitHub Advisory Database https://github.com/advisories/GHSA-8g5g-mxqh-grgj