CVE-2026-39363

Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket

Published Apr 7, 2026 CVSS 4.0 · 8.2 High EPSS 3.4% KEV · Not listed
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, if it is possible to connect to the Vite dev server’s WebSocket without an Origin header, an attacker can invoke fetchModule via the custom WebSocket event vite:invoke and combine file://... with ?raw (or ?inline) to retrieve the contents of arbitrary files on the server as a JavaScript string (e.g., export default "..."). The access control enforced in the HTTP request path (such as server.fs.allow) is not applied to this WebSocket-based execution path. This vulnerability is fixed in 6.4.2, 7.3.2, and 8.0.5.

Analysis

AI-generated

Technical impact

An attacker who can connect to the Vite dev server’s WebSocket without an Origin header can trigger a custom vite:invoke event that calls fetchModule. By providing a file:// path appended with ?raw or ?inline, the attacker can obtain the contents of any file on the server encoded as a JavaScript string. By obtaining the file contents, the attacker can potentially access sensitive configuration files, secrets, or other confidential data, though this outcome is inferred from the information provided, demonstrating weaknesses associated with CWE‑1220, CWE‑200, and CWE‑306.

Affected Systems

The Vite framework, including the vite-plus variant, is affected in all releases older than 6.4.2, 7.3.2, and 8.0.5. This includes version ranges such as 6.0.0‑6.4.1, 7.0.0‑7.3.1, and 8.0.0‑8.0.4. Users running a Vite dev server that is exposed to network traffic are at risk until they upgrade to the patched releases.

Risk and Exploitability

The CVSS score of 8.2 indicates high severity. Exploitation requires only the ability to reach the dev server’s WebSocket and does not require authentication or elevated privileges, as the server’s HTTP access controls are not applied to the WebSocket path. The EPSS score of 2% shows a low likelihood of exploitation. The vulnerability is not listed in CISA’s KEV catalog, but the high CVSS and the ease of remote exploitation make it a significant risk.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Vite 6.4.2, 7.3.2, 8.0.5 or later to remove the flaw.
  • Restrict the dev server’s WebSocket endpoint to trusted hosts or network segments using a firewall or reverse‑proxy rule.
  • Bind the dev server to localhost or place it behind authentication so that remote actors cannot access it.

Generated by OpenCVE AI on June 18, 2026 at 09:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-p9ff-h696-f583 Vite Vulnerable to Arbitrary File Read via Vite Dev Server WebSocket
History
Type Values Removed Values Added
First Time appeared Voidzero
Voidzero vite\+
CPEs cpe:2.3:a:vitejs:vite-plus:*:*:*:*:*:node.js:*:* cpe:2.3:a:voidzero:vite\+:*:*:*:*:*:node.js:*:*
Vendors & Products Voidzero
Voidzero vite\+
Type Values Removed Values Added
CPEs cpe:2.3:a:vitejs:vite-plus:*:*:*:*:*:node.js:*:*
cpe:2.3:a:vitejs:vite:*:*:*:*:*:node.js:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Vitejs
Vitejs vite
Vitejs vite-plus
Vendors & Products Vitejs
Vitejs vite
Vitejs vite-plus
Type Values Removed Values Added
Weaknesses CWE-1220
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

threat_severity

Important

Type Values Removed Values Added
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, if it is possible to connect to the Vite dev server’s WebSocket without an Origin header, an attacker can invoke fetchModule via the custom WebSocket event vite:invoke and combine file://... with ?raw (or ?inline) to retrieve the contents of arbitrary files on the server as a JavaScript string (e.g., export default "..."). The access control enforced in the HTTP request path (such as server.fs.allow) is not applied to this WebSocket-based execution path. This vulnerability is fixed in 6.4.2, 7.3.2, and 8.0.5.
Title Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
Weaknesses CWE-200
CWE-306
References
Metrics cvssV4_0

{'score': 8.2, 'vector': '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'}

Weaknesses
  • CWE-1220

    Insufficient Granularity of Access Control

  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-306

    Missing Authentication for Critical Function

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 25, 2026, 12:05 PM
Reserved
Apr 6, 2026, 9:29 PM
Status
Modified
Published
Apr 7, 2026, 8:16 PM
Modified
Aug 25, 2026, 1:18 PM
Severity
Important
Public date
Apr 7, 2026, 7:10 PM