CVE-2026-39363: Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
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.
Security readout for executives and security teams
Plain-English summary
Affected Vite development servers can disclose arbitrary server files to an unauthenticated attacker through a WebSocket path that bypasses normal file-access restrictions. Secrets, source code, configuration, and credentials stored on the development host may be exposed if an attacker can reach the vulnerable WebSocket endpoint.
Executive priority
Treat reachable vulnerable development servers as a high-priority confidentiality risk. Patch internet-accessible or shared-environment instances immediately, then complete an organization-wide dependency inventory. Investigate and rotate secrets where exposure is plausible. Isolated development systems remain important but can follow after externally reachable instances.
Technical view
Vite 6.0.0–6.4.1, 7.0.0–7.3.1, and 8.0.0–8.0.4 permit an Origin-less WebSocket client to invoke module fetching and read arbitrary files. The WebSocket execution path does not enforce HTTP-path controls such as server.fs.allow. Vite Plus versions before 0.1.16 are also listed as affected.
Likely exposure
Exposure requires an affected Vite or Vite Plus development server whose WebSocket is reachable by an untrusted party and accepts connections without an Origin header. Internet-exposed, shared-network, containerized, or remotely accessible development environments deserve immediate review. Production static Vite builds are not identified as affected by the supplied evidence.
Exploitation context
The issue is remotely reachable, unauthenticated, low complexity, and primarily threatens confidentiality, with CVSS 4.0 score 8.2. A specific prerequisite applies: the attacker must connect to the development server WebSocket without an Origin header. The supplied record is not in KEV and provides no evidence of active exploitation.
Researcher notes
The security boundary failure is path-specific: HTTP file restrictions are not applied to WebSocket-triggered module fetching. Assessment should distinguish live development servers from generated production assets and confirm both version and WebSocket reachability. The supplied sources establish disclosure impact and fixes, but do not establish exploitation in the wild.
Mitigation direction
Upgrade Vite 6.x to 6.4.2 or later.
Upgrade Vite 7.x to 7.3.2 or later.
Upgrade Vite 8.x to 8.0.5 or later.
Upgrade Vite Plus to 0.1.16 or later.
Until upgraded, restrict development-server and WebSocket access to trusted users and networks.
Rotate exposed secrets if logs or investigation indicate unauthorized file access.
Validation and detection
Inventory Vite and Vite Plus versions in manifests, lockfiles, build images, and developer environments.
Identify development servers reachable from public, shared, or otherwise untrusted networks.
Confirm deployed Vite versions meet the fixed release for their major version.
Verify the WebSocket endpoint rejects unauthorized Origin-less connections after remediation.
Review development-host telemetry for unexpected WebSocket connections or sensitive file retrieval activity.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1220: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
CWE-200: Information exposure and cloud metadata lookup
Information exposure and SSRF weaknesses can make discovery, cloud metadata, and credential material review relevant. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Authentication and credential weaknesses can make valid-account abuse and credential telemetry useful review starting points. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.