/Vulnerability Library

Vite Dev Server - Path Traversal in Optimized Deps .map Handling

CVE-2026-39365
Verified

Description

Vite development server versions prior to 8.0.5, 7.3.2, and 6.4.2 are vulnerable to path traversal through the optimized dependencies sourcemap handler. The dev server's handling of .map requests for optimized dependencies resolves file paths via normalizePath(path.resolve(root, url.slice(1))) and calls readFile without restricting ../ segments in the URL. This allows an attacker to bypass server.fs.strict and retrieve auto-generated sourcemaps for files located outside the project root, leaking absolute filesystem paths. Only dev servers explicitly exposed to the network using --host or server.host are affected.

Severity

Medium

CVSS Score

5.3

Exploit Probability

1%

Published Date

April 7, 2026

Template Author

theamanrawat

CVE-2026-39365.yaml
5.3Score

CVSS Metrics

CVSS Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
CVE ID:
cve-2026-39365
CWE ID:
cwe-22

References

https://github.com/advisories/GHSA-4w7w-66w2-5vf9https://github.com/vitejs/vite/security/advisories/GHSA-4w7w-66w2-5vf9https://nvd.nist.gov/vuln/detail/CVE-2026-39365

Remediation Steps

Upgrade Vite to version 8.0.5, 7.3.2, 6.4.2 or later.