CVE-2026-39365
JSON

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 packageVersionsReported 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.4CVE List, NVD
vitejs vite-plus< 0.1.16CVE List
vite (npm)from 8.0.0 before 8.0.5, from 7.0.0 before 7.3.2, before 6.4.2GitHub Advisory Database
voidzero vite+up to 0.1.15NVD

All scores

GitHub_M6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-22CWE-200

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

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 --host or server.host config option)
  • have a sensitive content in files ending with .map and 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
  1. Create a minimal PoC sourcemap outside the project root
    cat > /tmp/poc.map <<'EOF'
    {"version":3,"file":"x.js","sources":[],"names":[],"mappings":""}
    EOF
    
  2. Start the Vite dev server (example)
    pnpm -C playground/fs-serve dev --host 127.0.0.1 --port 18080
    
  3. Confirm that direct /@fs access is blocked by strict (returns 403) image
  4. Inject ../ segments under the optimized deps .map URL prefix to reach /tmp/poc.map image
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

SourceRecordLicence
CVE ListCVE-2026-39365 changed 2026-04-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-4w7w-66w2-5vf9 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-39365 changed 2026-07-24Public domain