6.0medium
vite allows server.fs.deny bypass via backslash on Windows
- Severity
- 6.0medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 1.05% (higher than 65% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-93m4-6634-74q7
Description
Vite is a frontend tooling framework for JavaScript. In versions from 2.9.18 to before 3.0.0, 3.2.9 to before 4.0.0, 4.5.3 to before 5.0.0, 5.2.6 to before 5.4.21, 6.0.0 to before 6.4.1, 7.0.0 to before 7.0.8, and 7.1.0 to before 7.1.11, files denied by server.fs.deny were sent if the URL ended with \ when the dev server is running on Windows. Only apps explicitly exposing the Vite dev server to the network and running the dev server on Windows were affected. This issue has been patched in versions 5.4.21, 6.4.1, 7.0.8, and 7.1.11.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vitejs vite | >= 7.1.0, < 7.1.11, >= 7.0.0, < 7.0.8, >= 6.0.0, < 6.4.1, >= 5.2.6, < 5.4.21, >= 4.5.3, < 5.0.0, >= 3.2.9, < 4.0.0, >= 2.9.18, < 3.0.0 | CVE List |
| vite (npm) | from 7.1.0 before 7.1.11, from 7.0.0 before 7.0.8, from 6.0.0 before 6.4.1, from 2.9.18 before 5.4.21, from 3.2.9 before 5.4.21, from 4.5.3 before 5.4.21, from 5.2.6 before 5.4.21 | GitHub Advisory Database |
All scores
| GitHub_M | 6.0medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
What each source says
CVE List
Vite is a frontend tooling framework for JavaScript. In versions from 2.9.18 to before 3.0.0, 3.2.9 to before 4.0.0, 4.5.3 to before 5.0.0, 5.2.6 to before 5.4.21, 6.0.0 to before 6.4.1, 7.0.0 to before 7.0.8, and 7.1.0 to before 7.1.11, files denied by server.fs.deny were sent if the URL ended with \ when the dev server is running on Windows. Only apps explicitly exposing the Vite dev server to the network and running the dev server on Windows were affected. This issue has been patched in versions 5.4.21, 6.4.1, 7.0.8, and 7.1.11.
GitHub Advisory Database
Summary
Files denied by server.fs.deny were sent if the URL ended with \ when the dev server is running on Windows.
Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using --host or
server.hostconfig option) - running the dev server on Windows
Details
server.fs.deny can contain patterns matching against files (by default it includes .env, .env.*, *.{crt,pem} as such patterns). These patterns were able to bypass by using a back slash(\). The root cause is that fs.readFile('/foo.png/') loads /foo.png.
PoC
npm create vite@latest
cd vite-project/
cat "secret" > .env
npm install
npm run dev
curl --request-target /.env\ http://localhost:5173
imageNVD (es)
Vite es un framework de herramientas de frontend para JavaScript. En las versiones desde la 2.9.18 hasta antes de la 3.0.0, desde la 3.2.9 hasta antes de la 4.0.0, desde la 4.5.3 hasta antes de la 5.0.0, desde la 5.2.6 hasta antes de la 5.4.21, desde la 6.0.0 hasta antes de la 6.4.1, desde la 7.0.0 hasta antes de la 7.0.8, y desde la 7.1.0 hasta antes de la 7.1.11, se enviaron archivos denegados por server.fs.deny si la URL terminaba con \ cuando el servidor de desarrollo se ejecuta en Windows. Solo las aplicaciones que exponían explícitamente el servidor de desarrollo de Vite a la red y que ejecutaban el servidor de desarrollo en Windows se vieron afectadas. Este problema ha sido parcheado en las versiones 5.4.21, 6.4.1, 7.0.8 y 7.1.11.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-62522 changed 2025-10-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-93m4-6634-74q7 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2025-62522 changed 2026-10-08 | Public domain |