Vulnerability · Published Apr 7, 2026 · Assigned by GitHub_M
CVE-2026-39363Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
High 7.5
In plain English
A high-severity information exposure in vite from vitejs. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 3.4% (higher than 89% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | vite | 8.0.5 | GHSA-p9ff-h696-f583 |
| npm | vite | 7.3.2 | GHSA-p9ff-h696-f583 |
| npm | vite | 6.4.2 | GHSA-p9ff-h696-f583 |
Affected products (as reported)
Weakness: CWE-200, CWE-306, CWE-1220 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/vitejs/vite/security/advisories/GHSA-p9ff-h696-f583 x_refsource_CONFIRM
- https://access.redhat.com/security/cve/CVE-2026-39363 vdb-entry, x_refsource_REDHAT
- RHBZ#2456179 issue-tracking, x_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39363.json x_sadp-csaf-vex
- https://access.redhat.com/errata/RHSA-2026:24761 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:24762 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:24866 vendor-advisory, x_refsource_REDHAT
- https://access.redhat.com/errata/RHSA-2026:59153 vendor-advisory, x_refsource_REDHAT