Skip to main content

CVE-2026-39364

| EUVDEUVD-2026-19873 HIGH
Incorrect Behavior Order: Validate Before Canonicalize (CWE-180)
2026-04-06 https://github.com/vitejs/vite GHSA-v2wj-q39q-566r
8.2
CVSS 4.0 · Vendor: https://github.com/vitejs/vite
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Expose Vite dev server to network via --host
  2. Exploit
    Request denied file via pattern bypass
  3. Impact
    Retrieve sensitive file contents in browser response

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Leading special element handling
Exploitation Conditions

Vite dev server explicitly exposed to network via --host flag or server.host config option. Sensitive files must exist in server.fs.allow directories and denied by server.fs.deny pattern. Remote unauthenticated attacker can access denied files via crafted requests.

Impact

Real-world risk is moderate and highly conditional on deployment configuration. The vulnerability requires three simultaneous conditions: explicit network exposure of the dev server (not default behavior), sensitive files located within server.fs.allow directories, and use of server.fs.deny patterns. Most production deployments use production builds rather than dev servers, significantly limiting exposure. However, for affected development environments, particularly those exposed on internal networks or cloud development platforms, the impact is severe as it enables direct disclosure of secrets like API keys, database credentials in .env files, and SSL certificates. Publicly available exploit code exists (demonstrated in the GitHub advisory with curl commands), making exploitation trivial for attackers with network access to affected dev servers. The attack vector is network-based with low complexity, requiring no authentication or user interaction. This is primarily a development-time vulnerability rather than a production runtime risk, but organizations running persistent dev environments or using Vite dev server in non-standard ways face genuine information disclosure threats. No CISA KEV listing indicates this is not being exploited at scale in production environments.

Exploit ScenarioDerived

A developer runs a Vite dev server with --host 0.0.0.0 to enable testing from mobile devices on the local network, with a .env file in the project containing database credentials and API keys. The developer has configured server.fs.deny to block .env access. An attacker on the same network discovers the dev server on port 5173, attempts to access /src/.env and receives HTTP 403 as expected. The attacker then appends ?raw to the request path, accessing http://target:5173/src/.env?raw, which bypasses the deny rule and returns HTTP 200 with the complete contents of the environment file. The attacker extracts production database credentials and AWS access keys from the response. With publicly available exploit code demonstrating the exact curl commands needed, exploitation requires minimal technical skill once network access to the dev server is obtained.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Apr 07, 2026

Vite development server allows unauthorized file disclosure by bypassing server.fs.deny restrictions when specific query parameters (?raw, ?import&raw, ?import&url&inline) are appended to file requests. The npm package 'vite' is affected when the dev server is explicitly exposed to the network and sensitive files exist within allowed directories but are supposedly blocked by deny patterns. A publicly available exploit code exists demonstrating retrieval of .env files and certificates. Fixed in versions 7.3.2 and 8.0.5 according to vendor release tags.

RemediationAI

Upgrade to Vite version 7.3.2 or later for the 7.x series, or version 8.0.5 or later for the 8.x series. The upstream fix is implemented in GitHub pull request #22160 (https://github.com/vitejs/vite/pull/22160) and commit a9a3df299378d9cbc5f069e3536a369f8188c8ff. Organizations using npm should update their package.json dependency to specify vite version ^7.3.2 or ^8.0.5 and run npm update or npm install to apply the patch. As a temporary workaround until patching is complete, avoid exposing Vite dev servers to network access by removing the --host flag or server.host configuration option, restricting dev server access to localhost only. Additionally, review server.fs.allow and server.fs.deny configurations to ensure sensitive files are not located within allowed directory trees. The complete security advisory with additional context is available at https://github.com/advisories/GHSA-v2wj-q39q-566r.

Affected VersionsENISA

vite-plus < 0.1.16
vite 7.1.0, < 7.3.2
vite 8.0.0, < 8.0.5

Affected Packages

npm vite fix: 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 modern frontend build tool and development server for JavaScript applications. The vulnerability affects the dev server's file system access control mechanism, specifically the server.fs.deny configuration option designed to block access to sensitive files like environment variables (.env) and certificates (*.crt). The root cause is CWE-180 (Incorrect Behavior Order: Validate Before Canonicalize), where the server's query parameter handling logic processes special directives (?raw, ?import&raw, ?import&url&inline) before enforcing filesystem deny rules. This allows attackers to bypass the deny list by appending these parameters to file paths, causing the server to return HTTP 200 responses with file contents instead of the expected HTTP 403 forbidden responses. The vulnerability exists in the npm package 'vite' as identified by CPE pkg:npm/vite, affecting the development server component specifically when configured with network exposure via --host flag or server.host configuration.

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 8.2 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 7.5 HIGH

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
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
PoC Detected
Apr 08, 2026 - 21:27 vuln.today
Public exploit code
Patch released
Apr 07, 2026 - 14:30 nvd
Patch available
CVE Published
Apr 06, 2026 - 18:03 nvd
HIGH 8.2

DescriptionCVE.org

Summary

The contents of files that are specified by server.fs.deny can be returned to the browser.

Impact

Only apps that match the following conditions are affected:

Details

On the Vite dev server, files that should be blocked by server.fs.deny (e.g., .env, *.crt) can be retrieved with HTTP 200 responses when query parameters such as ?raw, ?import&raw, or ?import&url&inline are appended.

PoC

  1. Start the dev server: pnpm exec vite root --host 127.0.0.1 --port 5175 --strictPort
  2. Confirm that server.fs.deny is enforced (expect 403): curl -i http://127.0.0.1:5175/src/.env | head -n 20

<img width="3944" height="1092" alt="image" src="https://github.com/user-attachments/assets/ecb9f2e0-e08f-4ac7-b194-e0f988c4cd4f" />

  1. Confirm that the same files can be retrieved with query parameters (expect 200):

<img width="2014" height="373" alt="image" src="https://github.com/user-attachments/assets/76bc2a6a-44f4-4161-ae47-eab5ae0c04a8" />

Executive ViewAI

Why It Matters

Vite development servers versions below 7.3.2 and 8.0.5 allow attackers to bypass file access restrictions and retrieve sensitive files such as environment variables and certificates through query parameter manipulation. This directly exposes credentials and secrets when dev servers are network-accessible, creating a critical path to credential compromise and lateral movement for any organization using affected Vite versions in exposed development environments.

Business Impact: High
Compensating Controls

Vendor-released patch: vite@7.3.2 and vite@8.0.5. Until patched: (1) immediately restrict dev server binding to localhost only (set host: '127.0.0.1' in vite.config.js), disable network exposure entirely; (2) move all .env files and certificates outside the project root and web-accessible directories; (3) implement firewall rules blocking external access to dev server ports; (4) audit and rotate all secrets that may have been exposed.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% 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 HIGH
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

61
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Vendor StatusVendor

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