[beta only] files otuside `server.fs.allow` and not included in `server.fs.deny` can be served by two requests using `?worker`.
Does it affect you?
Timeline
26 Nov- Published by the maintainer in vitejs/vite26 Nov, 10:16 UTC
- Seen by Patchwire +9 h26 Nov, 19:38 UTC
- Not in the GitHub database 4 days later30 Nov, 01:25 UTC
Versions of vite
Related alerts(8)
Same packagesSource summary
By sending an HTTP request to the dev server, a arbitrary code execution was possible. Only apps that match the following condition are affected: - explicitly exposes the Vite dev server to the network (using --host or [ server.host config option](https://vitejs.dev/config/server-options.html server-host)) Vite's resolver plugin has vite-browser-external: virtual module and vite-optional-peer-dep: virtual module. These modules embedded the module ID, which is derived from the URL, without escaping. The can be any value, so any code was able to be injected in those modules. Since Vite trusts…
- Affected
- vite >=8.3.0 <=8.3.6 · vite >=8.2.0 <=8.2.4 · vite >=8.0.0 <=8.1.6 · vite >=7.0.0 <=7.3.7 · vite >=4.0.0 <=6.4.5
- Fixed in
- 8.3.7 · 8.2.5 · 8.1.7 · 7.3.8 · 6.4.6
- ID
- GHSA-p4f5-76q4-ffq7
- Uses Vite v6 (affected by the missing back-port in v6.4.4).
- Vite dev server is explicitly exposed to the network via --host or the server.host config option.
- A sensitive file exists within the directories allowed by server.fs.allow.
- That sensitive file is matched by a server.fs.deny pattern (e.g., .env, .crt).
- Affected
- vite 6.4.4
- Fixed in
- 6.4.5
- ID
- GHSA-8g5g-mxqh-grgj
- Project uses launch-editor directly, via launch-editor-middleware, or via Vite.
- An attacker can create a file or directory whose name starts with + or - in the working directory.
- The editor in use is Vim/gVim, MacVim, Emacs/Emacsclient, or Notepad++ with a plugin exposing dangerous operations via plugin messages.
- Direct launch-editor use: the first argument passed to launchEditor can start with + or -, or the user is on WSL.
- launch-editor-middleware use: launch-editor older than v2.2.0 is in use, or the user is on WSL.
- Vite use: the user is on WSL.
- Affected
- vite >=8.3.0 <=8.3.2 · vite >=8.2.0 <=8.2.3 · vite >=8.0.0 <=8.1.5 · vite >=7.0.0 <=7.3.6 · vite <=6.4.3
- Fixed in
- 8.3.3 · 8.2.4 · 8.1.6 · 7.3.7 · 6.4.4
- ID
- GHSA-r825-w8mm-5pxw
- Project uses a vulnerable version of launch-editor (or launch-editor-middleware).
- Application runs on Windows.
- An attacker can control the file argument passed to launch-editor (e.g., via launch-editor-middleware request).
- Affected
- vite >=8.3.0 <=8.3.2 · vite >=8.2.0 <=8.2.3 · vite >=8.0.0 <=8.1.5 · vite >=7.0.0 <=7.3.6 · vite <=6.4.3
- Fixed in
- 8.3.3 · 8.2.4 · 8.1.6 · 7.3.7 · 6.4.4
- ID
- GHSA-587h-7wmj-h5pm
- Project uses launch-editor in a version that does not escape % in escapeCmdArgs().
- The app runs on Windows.
- An attacker can place a file whose filename contains & or %.
- An attacker can either inject an environment variable with a malicious value or add an NTFS alternate data stream to the placed file.
- An attacker-influenced argument is passed to launchEditor.
- Affected
- vite >=8.3.0 <=8.3.2 · vite >=8.2.0 <=8.2.3 · vite >=8.0.0 <=8.1.5 · vite >=7.0.0 <=7.3.6 · vite <=6.4.3
- Fixed in
- 8.3.3 · 8.2.4 · 8.1.6 · 7.3.7 · 6.4.4
- ID
- GHSA-698v-4r3x-3vcv
- Project runs a Vite dev server (e.g. Vite 8.2.1).
- The dev server passes the unchanged browser request URL (e.g. req.originalUrl) to server.transformIndexHtml, typically with server.middlewareMode: true or appType: 'custom' (not the internal spa/mpa handling).
- The transformed HTML contains an inline module script.
- Scripts in the page served by the dev server can access stored sensitive values or perform critical actions.
- A developer visits a malicious site while the dev server is running.
- Affected
- vite >=8.3.0 <=8.3.2 · vite >=8.2.0 <=8.2.3 · vite >=8.0.0 <=8.1.5 · vite >=7.0.0 <=7.3.6 · vite <=6.4.3 · vite-plus <=1.0.0
- Fixed in
- 8.3.3 · 8.2.4 · 8.1.6 · 7.3.7 · 6.4.4 · 1.1.0
- ID
- GHSA-9jrq-w75r-8gcw
- Vite dev server is explicitly exposed to the network via --host or the server.host option.
- A file outside the server.fs allowed paths contains sensitive information in its first 4 bytes.
- Vite is run with Node.js or Deno (not Bun).
- Vite dev server version includes the internal Wasm plugin that handles ?vite-wasm-instance without server.fs checks.
- Affected
- vite >=8.3.0 <=8.3.2 · vite >=8.2.0 <=8.2.3 · vite-plus >=0.2.8 <=1.0.0
- Fixed in
- 8.3.3 · 8.2.4 · 1.1.0
- ID
- GHSA-vfpm-58rq-9qcg
- Vite dev server is explicitly exposed to the network via --host or the server.host option.
- Project contains an imported file whose root-relative browser URL is also the absolute path of a readable file on the host (e.g. ./etc/hostname matching /etc/hostname).
- The sensitive host file is not matched by server.fs.deny.
- Vite dev server is not running on Windows.
- Project uses an affected Vite version (e.g. vite@8.3.1).
- Affected
- vite >=8.3.0 <=8.3.2 · vite >=8.2.0 <=8.2.3 · vite >=8.0.0 <=8.1.5 · vite >=7.0.0 <=7.3.6 · vite <=6.4.3 · vite-plus <=1.0.0
- Fixed in
- 8.3.3 · 8.2.4 · 8.1.6 · 7.3.7 · 6.4.4 · 1.1.0
- ID
- GHSA-rq7h-c2jc-7f22