Vite: `server.fs.deny` bypassed with queries
Summary
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.
Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using
--hostorserver.hostconfig 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
Details
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. 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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | vite | >= 6.4.4, < 6.4.5 | 6.4.5 |
References
- https://github.com/vitejs/vite/security/advisories/GHSA-8g5g-mxqh-grgj
- https://nvd.nist.gov/vuln/detail/CVE-2026-118662
- https://github.com/vitejs/vite/pull/22160
- https://github.com/vitejs/vite/pull/23855
- https://github.com/vitejs/vite/commit/91e40d7bf9777057bbd31c3eb036a54c9465697e
- https://github.com/vitejs/vite
- https://github.com/vitejs/vite/releases/tag/v6.4.5
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:N/SA:N- Weakness (CWE)
CWE-180, CWE-284- Platform
- npm
- Package
vite- Disclosed
- 29.10.2026
- Updated
- 29.10.2026 18:17
Sources and licenses
OSV / GitHub Advisory Database - GHSA-8g5g-mxqh-grgj - CC BY 4.0
Vulnerability history: vite
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 29
- First → latest
- 08.2022 10.2026
- Without a fix
- 0
- Exploited in attacks
- 1
Severity breakdown
- High 7
- Medium 19
- Low 3
Disclosures per year
- 2022: 1
- 2023: 2
- 2024: 4
- 2025: 9
- 2026: 13
-
Vite: `server.fs.deny` bypassed with queries this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.