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
A reachable Vite development server could disclose arbitrary server files through its WebSocket interface, bypassing normal file-access restrictions. Exposed files may include source code, configuration, credentials, or other sensitive data. Production applications are principally at risk when an affected development server remains accessible to untrusted networks.
Executive priority
Treat publicly or broadly reachable affected development servers as an urgent confidentiality risk and remediate immediately. Internal-only instances should be upgraded promptly after confirming network boundaries. If exposure existed, initiate a focused secret and sensitive-file exposure assessment rather than assuming the version upgrade resolves prior disclosure.
Technical view
Affected Vite WebSocket handling permits unauthenticated module-fetch requests when a connection can be established without an Origin header. This path does not enforce HTTP-side server.fs.allow controls, enabling arbitrary file disclosure. Vite 6.4.2, 7.3.2, and 8.0.5 contain the fix; vite-plus versions below 0.1.16 are listed as affected.
Likely exposure
Exposure requires an affected Vite or vite-plus version and network access to its development-server WebSocket under the stated Origin-header condition. Internet-facing, shared-network, containerized, preview, or remotely accessible development environments deserve immediate review. Static sites built by Vite are not shown by the supplied evidence to be independently vulnerable.
Exploitation context
The CVSS 4.0 score is 8.2, reflecting potentially severe confidentiality loss without privileges or user interaction, although a prerequisite condition applies. The supplied record is not in KEV and provides no evidence of active exploitation. Absence from KEV does not establish that exploitation has never occurred.
Researcher notes
The important control gap is path inconsistency: HTTP file restrictions are not applied to the WebSocket execution path. Scope validation should distinguish a running development server from static build output and account for reverse proxies or tunnels. The supplied sources establish disclosure capability and fixed versions, but do not establish public exploitation prevalence.
Mitigation direction
Upgrade Vite to 6.4.2, 7.3.2, or 8.0.5 according to the deployed major version.
Move vite-plus installations off versions below 0.1.16 and confirm vendor guidance.
Restrict development-server and WebSocket access to trusted local or authenticated networks.
Remove exposed development servers from production and public preview environments.
Rotate credentials if sensitive files may have been accessible during exposure.
Validation and detection
Inventory direct and transitive Vite and vite-plus versions across development, CI, preview, and production environments.
Confirm no affected development-server WebSocket is reachable from untrusted networks.
Verify deployed Vite versions meet the fixed thresholds for their respective major releases.
Review proxy, firewall, and tunnel configurations that may publish development-server WebSockets.
Review relevant access logs for unexpected WebSocket connections; available evidence may be incomplete.
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.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1220 · source CWE mapping
Insufficient Granularity of Access Control
Insufficient Granularity of Access Control represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Exposure of Sensitive Information to an Unauthorized Actor
Exposure of Sensitive Information to an Unauthorized Actor represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
Missing Authentication for Critical Function represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.