CVE-2026-39363
JSON

8.2high

Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket

Severity
8.2high CVSS:4.0 by GitHub_M
Exploit likelihood
3.47% (higher than 89% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-p9ff-h696-f583

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

Product or packageVersionsReported by
vitejs vite>= 8.0.0, < 8.0.5, >= 7.0.0, < 7.3.2, >= 6.0.0, < 6.4.2, from 6.0.0 up to 6.4.1, from 7.0.0 up to 7.3.1, from 8.0.0 up to 8.0.4CVE List, NVD
vitejs vite-plus< 0.1.16CVE List
automation-gatewayNot specified
Not affected: from 0:2.5.20260422-3.el8ap before *, from 0:2.5.20260422-3.el9ap before *
CVE List
automation-platform-uiNot specified
Not affected: from 0:2.6.9-1.el9ap before *
CVE List
ansible-automation-platform-tech-preview/mcp-server-rhel9Not specified
Not affected: from 1779783248 before *
CVE List
ansible-automation-platform-27/gateway-rhel9Not specified
Not affected: from 1787218409 before *
CVE List
rhacs-eng/release-mainNot specifiedCVE List
automation-controllerNot specifiedCVE List
automation-eda-controllerNot specifiedCVE List
viteNot specifiedCVE List
podman-desktop-macos-1-0Not specifiedCVE List
podman-desktop-windows-1-0Not specifiedCVE List

All scores

GitHub_M8.2high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
redhat-SADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Classification

CWE-200CWE-306CWE-1220

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Summary

server.fs check was not enforced to the fetchModule method that is exposed in Vite dev server's WebSocket.

Impact

Only apps that match the following conditions are affected:

  • explicitly exposes the Vite dev server to the network (using --host or server.host config option)
  • WebSocket is not disabled by server.ws: false

Arbitrary files on the server (development machine, CI environment, container, etc.) can be exposed.

Details

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.

PoC
  1. Start the dev server on the target Example (used during validation with this repository):

    pnpm -C playground/alias exec vite --host 0.0.0.0 --port 5173
    
  2. Confirm that access is blocked via the HTTP path (example: arbitrary file)

    curl -i 'http://localhost:5173/@fs/etc/passwd?raw'
    

    Result: 403 Restricted (outside the allow list) image

  3. Confirm that the same file can be retrieved via the WebSocket path By connecting to the HMR WebSocket without an Origin header and sending a vite:invoke request that calls fetchModule with a file://... URL and ?raw, the file contents are returned as a JavaScript module.

    image
image
NVD (es)

Vite es un framework de herramientas de frontend para JavaScript. Desde la versión 6.0.0 hasta antes de las versiones 6.4.2, 7.3.2 y 8.0.5, si es posible conectarse al WebSocket del servidor de desarrollo de Vite sin una cabecera Origin, un atacante puede invocar fetchModule a través del evento WebSocket personalizado vite:invoke y combinar file://... con ?raw (o ?inline) para recuperar el contenido de archivos arbitrarios en el servidor como una cadena de JavaScript (por ejemplo, export default '...'). El control de acceso aplicado en la ruta de solicitud HTTP (como server.fs.allow) no se aplica a esta ruta de ejecución basada en WebSocket. Esta vulnerabilidad se corrige en las versiones 6.4.2, 7.3.2 y 8.0.5.

References

https://github.com/vitejs/vite/security/advisories/GHSA-p9ff-h696-f583exploit, vendor-advisory, web
https://access.redhat.com/security/cve/CVE-2026-39363vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2456179issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-39363.json
https://access.redhat.com/errata/RHSA-2026:24761vendor-advisory
https://access.redhat.com/errata/RHSA-2026:24762vendor-advisory
https://access.redhat.com/errata/RHSA-2026:24866vendor-advisory
https://access.redhat.com/errata/RHSA-2026:59153vendor-advisory
https://nvd.nist.gov/vuln/detail/CVE-2026-39363advisory
https://github.com/vitejs/vite/pull/22159web
https://github.com/vitejs/vite/commit/f02d9fde0b195afe3ea2944414186962fbbe41e0web
https://github.com/vitejs/vitepackage

Sources

SourceRecordLicence
CVE ListCVE-2026-39363 changed 2026-08-25CVE Terms of Use
GitHub Advisory DatabaseGHSA-p9ff-h696-f583 changed 2026-09-10CC-BY-4.0
NVDCVE-2026-39363 changed 2026-08-25Public domain