CVE-2026-39365 Vite has a Path Traversal in Optimized Deps `.map` Handling

Medium 6.3 Published Updated

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.

PackageAffectedFixed in
vite npmAll versions6.4.2
vite npmAll versions6.4.2
vite npmFrom 7.0.07.3.2
vite npmFrom 7.0.07.3.2
vite npmFrom 8.0.08.0.5
vite npmFrom 8.0.08.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.

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.

Is CVE-2026-39365 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free