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

Published Apr 6, 2026
·
Updated

### 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](https://vitejs.dev/config/server-options.html#server-host)) - 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`](https://vite.dev/config/server-options#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 ```bash cat > /tmp/poc.map <<'EOF' {"version":3,"file":"x.js","sources":[],"names":[],"mappings":""} EOF ``` 2. Start the Vite dev server (example) ```bash 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) <img width="4004" height="1038" alt="image" src="https://github.com/user-attachments/assets/15a859a8-1dc6-4105-8d58-80527c0dd9ab" /> 4. Inject `../` segments under the optimized deps `.map` URL 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" />

Affected Software

7 affected componentsFixes available
npm/vite<=6.4.1
6.4.2
npm/vite>=7.0.0<=7.3.1
7.3.2
npm/vite>=8.0.0<=8.0.4
8.0.5
vitejs Vite Node.js>=6.0.0<=6.4.1
vitejs Vite Node.js>=7.0.0<=7.3.1
vitejs Vite Node.js>=8.0.0<=8.0.4
Voidzero Vite\+ Node.js<=0.1.15

Event History

Apr 6, 2026
Advisory Published
via GitHub·06:03 PM
Data Sourced
via GitHub·06:03 PM
DescriptionWeaknessAffected Software
Apr 7, 2026
CVE Published
via MITRE·07:13 PM
Data Sourced
via MITRE·07:13 PM
DescriptionWeakness
Data Sourced
via NVD·08:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:16 PM
Affected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-39365?

CVE-2026-39365 is considered a moderate severity vulnerability due to its potential exposure of sensitive files.

2

How do I fix CVE-2026-39365?

To fix CVE-2026-39365, upgrade Vite to version 6.4.2 or above, 7.3.2 or above, or 8.0.5 or above depending on your current version.

3

What types of projects are affected by CVE-2026-39365?

CVE-2026-39365 affects projects that explicitly expose the Vite dev server to the network.

4

What is the impact of CVE-2026-39365?

The impact of CVE-2026-39365 is that malicious users may retrieve files ending in .map from outside the project.

5

Which versions of Vite are vulnerable to CVE-2026-39365?

Versions of Vite prior to 6.4.2, between 7.0.0 and 7.3.1, and between 8.0.0 and 8.0.4 are vulnerable to CVE-2026-39365.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203