CVE-2026-39365 Vite has a Path Traversal in Optimized Deps `.map` Handling
Attackers can bypass file access restrictions to read source map files outside the project root via crafted requests to the Vite dev server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-39365?
CVE-2026-39365 is a medium-severity path traversal vulnerability in vitejs vite, published on 7 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-22
Which versions are affected by CVE-2026-39365?
6 open source packages ship an affected version, including vite. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
vite npm | All versions | 6.4.2 |
vite npm | All versions | 6.4.2 |
vite npm | From 7.0.0 | 7.3.2 |
vite npm | From 7.0.0 | 7.3.2 |
vite npm | From 8.0.0 | 8.0.5 |
vite npm | From 8.0.0 | 8.0.5 |
Products include Vitejs Vite, Voidzero Vite\+.
How do I fix CVE-2026-39365?
Upgrade vite to a fixed version for your release line: 6.4.2, 7.3.2 or 8.0.5.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-39365 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-39365 exists.
Public exploit code: 1 Nuclei template.
Other vulnerabilities in vitejs vite
- CVE-2025-31125 Vite Vitejs Improper Access Control
- CVE-2026-53571 Vite: `server.fs.deny` bypass on Windows alternate paths
- CVE-2026-39363 Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
- CVE-2026-39364 Vite has a `server.fs.deny` bypass with queries
- CVE-2024-23331 Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem
Sources
Also known as CLSA-2026-1778201087, GHSA-4w7w-66w2-5vf9, MINI-3p7r-v996-8f8p, MINI-7x4h-6rf7-9689, MINI-f5qh-qpm4-xx7f, MINI-g95j-3hj7-663j and 4 more.