Vite Vulnerable to Path Traversal in Optimized Deps `.map` Handling
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
bash
cat > /tmp/poc.map <<'EOF' {"version":3,"file":"x.js","sources":[],"names":[],"mappings":""} EOF - Start the Vite dev server (example)
bash
pnpm -C playground/fs-serve dev --host 127.0.0.1 --port 18080 - Confirm that direct
/@fsaccess is blocked bystrict(returns 403) <img width="4004" height="1038" alt="image" src="https://github.com/user-attachments/assets/15a859a8-1dc6-4105-8d58-80527c0dd9ab" /> - Inject
../segments under the optimized deps.mapURL prefix to reach/tmp/poc.map<img width="2790" height="846" alt="image" src="https://github.com/user-attachments/assets/5d02957d-2e6a-4c45-9819-3f024e0e81f2" />
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | vite | >= 8.0.0, < 8.0.5, >= 7.0.0, < 7.3.2, < 6.4.2 | 8.0.5, 7.3.2, 6.4.2 |
Referencias
- https://github.com/vitejs/vite/security/advisories/GHSA-4w7w-66w2-5vf9
- https://nvd.nist.gov/vuln/detail/CVE-2026-39365
- https://github.com/vitejs/vite/pull/22161
- https://github.com/vitejs/vite/commit/79f002f2286c03c88c7b74c511c7f9fc6dc46694
- https://github.com/vitejs/vite
- https://github.com/vitejs/vite/releases/tag/v6.4.2
- https://github.com/vitejs/vite/releases/tag/v7.3.2
- https://github.com/vitejs/vite/releases/tag/v8.0.5
- Vector CVSS
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- Debilidad (CWE)
CWE-200, CWE-22- Plataforma
- npm
- Paquete
vite- Publicada
- 06.04.2026
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-4w7w-66w2-5vf9 - CC BY 4.0
Historial de vulnerabilidades: vite
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 24
- Primera → última
- 08.2022 10.2026
- Sin corrección
- 0
- Explotada en ataques
- 1
Distribución por gravedad
- Alta 8
- Media 14
- Baja 2
Divulgaciones por año
- 2022: 1
- 2023: 2
- 2024: 4
- 2025: 9
- 2026: 8
-
Vite Vulnerable to Path Traversal in Optimized Deps `.map` Handling esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.