Skip to main content

CVE-2026-39365

| EUVDEUVD-2026-19875 MEDIUM
Path Traversal (CWE-22)
2026-04-06 https://github.com/vitejs/vite GHSA-4w7w-66w2-5vf9
6.3
CVSS 4.0 · Vendor: https://github.com/vitejs/vite
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

While CVSS and EPSS data are unavailable, the practical risk is moderate-to-high when conditions align. The SSVC framework and available signals indicate: (1) Exploitation status: publicly available exploit code exists (PoC demonstrated in the advisory), (2) Attack vector: network-based, requiring only HTTP requests; no authentication required, (3) Automatable: yes-path traversal attacks are trivial to automate and discover via directory enumeration, (4) Technical impact: confidentiality breach-sensitive files (e.g., .map files containing source code, URLs, API endpoints) can be extracted, (5) Preconditions are critical: the dev server must be explicitly exposed to the network (using --host or server.host config), and target .map files must exist at predictable paths outside the project root. In default configurations (dev server bound to localhost only), the risk is minimal. In production-adjacent scenarios where dev servers are exposed for CI/CD, debugging, or team collaboration, the risk is significant. The reliance on predictable file paths and valid JSON parsing slightly reduces automatable impact but does not eliminate it in environments with standard project structures.

Exploit ScenarioDerived

An attacker probes a Vite dev server exposed on a network (e.g., via --host 0.0.0.0 or a CI/CD pipeline accessible over the network). Using the publicly disclosed PoC technique, the attacker injects path traversal sequences (e.g., /@vite/deps/../../../tmp/poc.map) into HTTP requests to the dev server's .map endpoint, bypassing server.fs.strict restrictions. If a valid source map file exists at a predictable location outside the project root (e.g., /tmp/poc.map or a sibling project directory), the server returns its contents, potentially leaking source code, API endpoints, or other sensitive metadata embedded in the source map. Automation is trivial; an attacker can systematically enumerate common file paths and directory structures to extract multiple .map files.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 3.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 07, 2026

Path traversal in Vite dev server versions 6.x through 7.3.1 allows unauthenticated remote attackers to bypass filesystem restrictions and retrieve sensitive .map files outside the project root by injecting path traversal sequences into optimized dependency URLs. The vulnerability requires explicit network exposure of the dev server and predictable file paths, but publicly available proof-of-concept code demonstrates the attack. Affected Vite instances should upgrade to v6.4.2, v7.3.2, or v8.0.5.

RemediationAI

Upgrade Vite to a patched version: v6.4.2 or later for the 6.x branch, v7.3.2 or later for the 7.x branch, or v8.0.5 or later for the 8.x branch. The upstream fix is available in PR #22161 and commit 79f002f2286c03c88c7b74c511c7f9fc6dc46694 (https://github.com/vitejs/vite/pull/22161). As an immediate workaround, restrict network exposure of the dev server by not using --host or by binding to localhost only via server.host: 'localhost' in the Vite config. Ensure the dev server is never exposed to untrusted networks. For environments that must expose the dev server, apply the patch immediately and validate that .map files containing sensitive information are not stored at predictable paths outside the project root.

Affected VersionsENISA

vite 6.0.0, < 6.4.2
vite 7.0.0, < 7.3.2
vite-plus < 0.1.16
vite 8.0.0, < 8.0.5

Affected Packages

npm vite fix: 6.4.2, 7.3.2, 8.0.5
euvd vite_plus fix: 0.1.16

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Vite is a build tool and development server for modern JavaScript applications. The vulnerability exists in the dev server's request handler for source map files (.map) associated with optimized dependencies. The root cause (CWE-22: Improper Limitation of a Pathname to a Restricted Directory) stems from insufficient path normalization when processing .map file requests. The code resolves file paths and calls readFile without stripping or validating ../ (parent directory) sequences in the URL, allowing traversal past the intended root directory boundary. This bypasses the server.fs.strict configuration option, which is designed to restrict file access to an allow list. The vulnerability affects npm package vite across multiple major versions via the affected CPE strings.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/vitejs/vite) PRIMARY 6.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (https://github.com/vitejs/vite).

CVSS VectorVendor: https://github.com/vitejs/vite

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch released
Apr 07, 2026 - 14:30 nvd
Patch available
CVE Published
Apr 06, 2026 - 18:03 nvd
MEDIUM 6.3

DescriptionCVE.org

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)
  • 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 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
  1. Start the Vite dev server (example)
bash
    pnpm -C playground/fs-serve dev --host 127.0.0.1 --port 18080
  1. 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" />

  1. 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" />

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 34 npm packages depend on vite (30 direct, 4 indirect)

Ecosystem-wide dependent count for version 8.0.0.

Threat Intelligence Overview

EPSS Score
3.1%
Top 13% exploitable
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA POC (1) Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 3.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

55
Low Medium High Critical
KEV: 0
EPSS: +3
CVSS: +32
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy