vite
Affected
- introduced
8.0.0, fixed8.0.5(semver)
Fixed versions
8.0.5
Fix
- Fixed version
8.0.5npm install [email protected]
Advisory
Also known as: CVE-2026-39365
Vite Vulnerable to Path Traversal in Optimized Deps .map Handling
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:
--host or `server.host` config option).map and the path is predictableDetails
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
bash cat > /tmp/poc.map <<'EOF' {"version":3,"file":"x.js","sources":[],"names":[],"mappings":""} EOF bash pnpm -C playground/fs-serve dev --host 127.0.0.1 --port 18080 /@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" />../ 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" />Medium Basis: The source's own band: MODERATE
8.0.0, fixed 8.0.5 (semver)8.0.5
8.0.5npm install [email protected]7.0.0, fixed 7.3.2 (semver)7.3.2
7.3.2npm install [email protected]0, fixed 6.4.2 (semver)6.4.2
6.4.2npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0