6.3medium
Vite has a Path Traversal in Optimized Deps `.map` Handling
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.93% (higher than 61% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-4w7w-66w2-5vf9
Description
Vite is a frontend tooling framework for JavaScript. From 6.0.0 to before 6.4.2, 7.3.2, and 8.0.5, the dev server’s handling of .map requests for optimized dependencies resolves file paths and calls readFile without restricting ../ segments in the URL. As a result, it is possible to bypass the server.fs.strict allow list and retrieve .map files located outside the project root, provided they can be parsed as valid source map JSON. This vulnerability is fixed in 6.4.2, 7.3.2, and 8.0.5.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| vitejs vite | >= 8.0.0, < 8.0.5, >= 7.0.0, < 7.3.2, >= 6.0.0, < 6.4.2, from 6.0.0 up to 6.4.1, from 7.0.0 up to 7.3.1, from 8.0.0 up to 8.0.4 | CVE List, NVD |
| vitejs vite-plus | < 0.1.16 | CVE List |
| vite (npm) | from 8.0.0 before 8.0.5, from 7.0.0 before 7.3.2, before 6.4.2 | GitHub Advisory Database |
| voidzero vite+ | up to 0.1.15 | NVD |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/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:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Classification
What each source says
CVE List
Vite is a frontend tooling framework for JavaScript. From 6.0.0 to before 6.4.2, 7.3.2, and 8.0.5, the dev server’s handling of .map requests for optimized dependencies resolves file paths and calls readFile without restricting ../ segments in the URL. As a result, it is possible to bypass the server.fs.strict allow list and retrieve .map files located outside the project root, provided they can be parsed as valid source map JSON. This vulnerability is fixed in 6.4.2, 7.3.2, and 8.0.5.
GitHub Advisory Database
Summary
Any files ending with .map even out side the project can be returned to the browser.
Impact
Only apps that match the following conditions are affected:
- explicitly exposes the Vite dev server to the network (using
--hostorserver.hostconfig option) - have a sensitive content in files ending with
.mapand the path is predictable
Details
In Vite v7.3.1, the dev server’s handling of .map requests for optimized dependencies resolves file paths and calls readFile without restricting ../ segments in the URL. As a result, it is possible to bypass the server.fs.strict allow list and retrieve .map files located outside the project root, provided they can be parsed as valid source map JSON.
PoC
- Create a minimal PoC sourcemap outside the project root
cat > /tmp/poc.map <<'EOF' {"version":3,"file":"x.js","sources":[],"names":[],"mappings":""} EOF - Start the Vite dev server (example)
pnpm -C playground/fs-serve dev --host 127.0.0.1 --port 18080 - Confirm that direct
/@fsaccess is blocked bystrict(returns 403) image - Inject
../segments under the optimized deps.mapURL prefix to reach/tmp/poc.mapimage
NVD (es)
Vite es un framework de herramientas de frontend para JavaScript. Desde la versión 6.0.0 hasta antes de las versiones 6.4.2, 7.3.2 y 8.0.5, el manejo del servidor de desarrollo (dev server) de las solicitudes .map para dependencias optimizadas resuelve rutas de archivo y llama a readFile sin restringir los segmentos ../ en la URL. Como resultado, es posible eludir la lista de permitidos (allow list) server.fs.strict y recuperar archivos .map ubicados fuera de la raíz del proyecto, siempre que puedan ser analizados como JSON de mapa de origen (source map) válido. Esta vulnerabilidad se corrige en las versiones 6.4.2, 7.3.2 y 8.0.5.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-39365 changed 2026-04-15 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-4w7w-66w2-5vf9 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-39365 changed 2026-07-24 | Public domain |