The Vite team published a Critical advisory on November 10, 2026: GHSA-p4f5-76q4-ffq7, “Remote code execution using __vite-browser-external virtual module.” No CVE ID was listed when we checked. It covers every major line from Vite 4.0 to 8.3.6, plus vite-plus up to 1.5.0.
The condition that matters: the attack only works if your dev server is reachable over the network. That is what vite --host, server.host: true or server.host: '0.0.0.0' do, and it’s common in Docker setups, cloud IDEs, devcontainers, “test on my phone” workflows and CI preview environments.
How the bug works
Vite’s resolver plugin creates two virtual modules, __vite-browser-external:<id> and __vite-optional-peer-dep:<id>. The <id> part comes from the request URL and was embedded into generated module code without escaping. So a crafted URL can inject JavaScript into a module that Vite trusts. That leads to two problems:
- File read past
server.fs. Files that a module imports are treated as allowed. Injectimport '/@fs/path/to/secret'and a file that normally returns 403 Restricted becomes fetchable. The advisory’s PoC reads a file in/tmpthis way. - Code execution on the server. Vite uses
evalto pull values out of module code fornew Workerandimport.meta.glob. Injected code inside that path runs in the Node process. Vite hides a few globals likerequireandexports, but the advisory notes this “is not a security boundary,” andglobalThis.process.getBuiltinModulegets around it.
A dev server process usually holds your source, .env files, cloud credentials in the environment and SSH agent access, so code execution there is a serious compromise.
In Vite 8 the vulnerable code sits in the Rolldown binary. Vite 8.3.7 and 8.2.5 depend on the fix in Rolldown 1.2.17, and 8.1.7 on Rolldown 1.1.7. The report was marked as submitted with AI assistance.
Fixed versions
| Line | Vulnerable | Fixed |
|---|---|---|
| 8.3 | 8.3.0 – 8.3.6 | 8.3.7 |
| 8.2 | 8.2.0 – 8.2.4 | 8.2.5 |
| 8.0 / 8.1 | 8.0.0 – 8.1.6 | 8.1.7 |
| 7.x | 7.0.0 – 7.3.7 | 7.3.8 |
| 4.x – 6.x | 4.0.0 – 6.4.5 | 6.4.6 |
| vite-plus | ≤ 1.5.0 | 1.5.1 |
What to do
# See which Vite version(s) you actually resolve (frameworks pin their own)
npm ls vite # or: pnpm why vite / yarn why vite
# Upgrade within your major line
npm i -D vite@^8.3.7 # or 7.3.8 / 6.4.6 for older lines
# Find dev servers that are exposed on purpose
rg -n "server:\s*\{[^}]*host|--host" vite.config.* package.json
- Check framework lockfiles. Astro, SvelteKit, Nuxt, Remix/React Router, Vitest and Storybook all pull in Vite transitively. Make sure the lockfile resolves to a fixed version, not just your direct dependency.
- Don’t publish dev servers. If you need LAN or container access, bind to a specific interface, put the server behind an authenticated tunnel, or use
vite previewon a built bundle for demos. A dev server is not a production server. - Cloud IDEs and preview boxes: treat any internet-reachable Vite dev URL that ran a vulnerable version as possibly compromised. Rotate the secrets that process could see.