Remote code execution using `__vite-browser-external` virtual module.

CriticalGHSA-p4f5-76q4-ffq710 Nov · 20 days ago
Source

Does it affect you?

Under review

A person checks critical advisories before their conditions show.

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…

Timeline

10 Nov
20 daysahead of the GitHub database so far
  1. Published by the maintainer in vitejs/vite10 Nov, 01:35 UTC
  2. Seen by Patchwire +42 min10 Nov, 02:18 UTC
  3. Not in the GitHub database 20 days later29 Nov, 19:15 UTC
vite8.3.78.2.58.1.77.3.86.4.6

Versions of vite

8.x
safe 8.3.7
7.x
safe 7.3.8
6.x
safe 6.4.6
AffectedSafe

Packages

Stacks

Related alerts(8)

Same packages
Medium
Exploitable only if · read by Gemini, the source remains the reference
  • Using v8.4.0-beta.1
  • explicitly exposes the Vite dev server to the network (using --host or server.host config option)
  • the sensitive file exists is not specified by server.fs.deny
Affected
vite 8.4.0-beta.1
Fixed in
8.4.0-beta.2
ID
GHSA-qppr-rxr4-jjq2
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