[beta only] files otuside `server.fs.allow` and not included in `server.fs.deny` can be served by two requests using `?worker`.

MediumGHSA-qppr-rxr4-jjq226 Nov · 4 days ago
Source

Does it affect you?

0/3All must holdTicks stay in this browser
Conditions read by Gemini. The sources remain the reference.Maintainer advisory

Timeline

26 Nov
3 daysahead of the GitHub database so far
  1. Published by the maintainer in vitejs/vite26 Nov, 10:16 UTC
  2. Seen by Patchwire +9 h26 Nov, 19:38 UTC
  3. Not in the GitHub database 4 days later30 Nov, 01:25 UTC
vite8.4.0-beta.2

Versions of vite

8.x
safe 8.4.0-beta.2
AffectedSafe

Packages

Stacks

Related alerts(8)

Same packages
Critical
Conditions under review

Source 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
Open the alert
Medium
Exploitable only if · read by Gemini, the source remains the reference
  • 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
Open the alert
Medium
Exploitable only if · read by Gemini, the source remains the reference
  • 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
Open the alert
High
Exploitable only if · read by Gemini, the source remains the reference
  • 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
Open the alert
Medium
Exploitable only if · read by Gemini, the source remains the reference
  • 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
Open the alert
Low
Exploitable only if · read by Gemini, the source remains the reference
  • 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
Open the alert
Medium
Exploitable only if · read by Gemini, the source remains the reference
  • 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
Open the alert
Medium
Exploitable only if · read by Gemini, the source remains the reference
  • 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
Open the alert