GHSA-p4f5-76q4-ffq7 CRITICAL · CVSS 9.1 · Vite (VoidZero) — vite / vite-plus (npm) ·

GHSA-p4f5-76q4-ffq7: Resolver plugin virtual modules __vite-browser-external: and __vite-optional-peer-dep: (unescaped module ID)

The URL-derived module ID was embedded into Vite’s __vite-browser-external and __vite-optional-peer-dep virtual modules without escaping. Injected imports bypass the server.fs allow list (arbitrary file read), and Vite’s eval for new Worker / import.meta.glob executes injected code on the dev server; globalThis.process.getBuiltinModule bypasses the blocked globals.

Identifier
GHSA-p4f5-76q4-ffq7
Vendor / Product
Vite (VoidZero) · vite / vite-plus (npm)
Severity / CVSS
CRITICAL · CVSS 9.1
Vector / CWE
CWE-116 (Improper Encoding or Escaping of Output)
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N; HTTP requests to a dev server exposed with --host / server.host
Affected
vite >=4.0.0 <=6.4.5, >=7.0.0 <=7.3.7, >=8.0.0 <=8.1.6, >=8.2.0 <=8.2.4, >=8.3.0 <=8.3.6; vite-plus <=1.5.0 (only when the dev server is exposed to the network)
Patched Version
vite 8.3.7, 8.2.5, 8.1.7, 7.3.8, 6.4.6; vite-plus 1.5.1
Priority
P0 for any network-exposed Vite dev server (containers, cloud IDEs, preview boxes); P1 to upgrade everywhere

Executive Summary & Technical Impact

The URL-derived module ID was embedded into Vite’s __vite-browser-external and __vite-optional-peer-dep virtual modules without escaping. Injected imports bypass the server.fs allow list (arbitrary file read), and Vite’s eval for new Worker / import.meta.glob executes injected code on the dev server; globalThis.process.getBuiltinModule bypasses the blocked globals.

Tracked under GHSA-p4f5-76q4-ffq7 (CWE-116 (Improper Encoding or Escaping of Output)), this vulnerability affects vite >=4.0.0 <=6.4.5, >=7.0.0 <=7.3.7, >=8.0.0 <=8.1.6, >=8.2.0 <=8.2.4, >=8.3.0 <=8.3.6; vite-plus <=1.5.0 (only when the dev server is exposed to the network) and carries a severity score of 9.1 (CRITICAL). Engineering and security operations teams running vite / vite-plus (npm) should prioritize upgrading to vite 8.3.7, 8.2.5, 8.1.7, 7.3.8, 6.4.6; vite-plus 1.5.1.

Remediation & Patch Guidance

  1. Upgrade vite to 8.3.7, 8.2.5, 8.1.7, 7.3.8 or 6.4.6 (vite-plus 1.5.1) and confirm the lockfile resolves the fixed version for framework-bundled Vite.
  2. Stop exposing dev servers with --host/server.host on shared or public networks; use an authenticated tunnel or vite preview for demos.
  3. Rotate secrets visible to any vulnerable dev server that was reachable from untrusted networks.

Frequently Asked Questions (GHSA-p4f5-76q4-ffq7)

What versions are affected by GHSA-p4f5-76q4-ffq7?

GHSA-p4f5-76q4-ffq7 affects vite >=4.0.0 <=6.4.5, >=7.0.0 <=7.3.7, >=8.0.0 <=8.1.6, >=8.2.0 <=8.2.4, >=8.3.0 <=8.3.6; vite-plus <=1.5.0 (only when the dev server is exposed to the network) in vite / vite-plus (npm) (Resolver plugin virtual modules __vite-browser-external: and __vite-optional-peer-dep: (unescaped module ID)).

How do I patch or remediate GHSA-p4f5-76q4-ffq7?

Upgrade affected deployments to vite 8.3.7, 8.2.5, 8.1.7, 7.3.8, 6.4.6; vite-plus 1.5.1 and verify the remediation steps listed above.

What is the CVSS score of GHSA-p4f5-76q4-ffq7?

GHSA-p4f5-76q4-ffq7 is rated CRITICAL with a CVSS score of 9.1 (vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N; HTTP requests to a dev server exposed with --host / server.host).

Full TechPulse Investigation

Vite Dev Server RCE (GHSA-p4f5-76q4-ffq7): One HTTP Request to an Exposed `vite --host` Runs Code on Your Machine

An unescaped module ID in the __vite-browser-external and __vite-optional-peer-dep virtual modules lets a network attacker read files outside the allow list and get eval'd code on the dev server. Vite 4.0 through 8.3.6 are affected; upgrade to 8.3.7, 8.2.5, 8.1.7, 7.3.8 or 6.4.6.

Read full engineering post-mortem (4 min read) →

Official Vendor & NVD Advisory Links

  1. GitHub Advisory GHSA-p4f5-76q4-ffq7