Vite · CVE-2026-140097
Vite dev server
Patch now if…Only dev servers opened to the network.
TL;DR
Vite's dev server lets anyone who can reach it read files and run code on the machine running it. Steps to read files are public; no attacks seen. Only the dev server is affected, and only when exposed with --host or server.host. Update Vite.
More details
Vite rates it Critical (CVSS 4.0 9.1); its advisory and fixes came out on 9 and 10 Nov, and the CVE record followed on 30 Nov. A request with a crafted module name gets the attacker's text into a module Vite trusts, so the dev server serves files outside its allow list and can evaluate the code. Attackers have gone after exposed Vite dev servers before: CVE-2025-31125, which needs the same setup, has been on CISA's KEV list since 22 Jan 2026.
How scary is it?
Are you affected? only if all are true
1Vite 4.0 or later without the fix
Affected: 4.0.0 through 6.4.5, 7.0.0 through 7.3.7, 8.0.0 through 8.1.6, 8.2.0 through 8.2.4 and 8.3.0 through 8.3.6, plus vite-plus before 1.5.1. Vite 8.4 isn't listed. On Vite 8 the faulty code is in the Rolldown bundler that Vite uses, and the fixed Vite releases pull in a fixed Rolldown. Check which Vite your project installs with npm ls vite.1,2,9
2The dev server is exposed
Only the dev server is affected, and only when started with --host or with server.host set in the Vite config. Without them it listens on localhost only. Look for --host in your dev script and server.host in vite.config.*.1,5
3An attacker can reach that port
No login is needed: one crafted HTTP request to the dev server can trigger it. With --host (or server.host set to true or '0.0.0.0') it listens on all addresses, "including LAN and public addresses", so anyone on the same network, or the internet if the port is open, can send that request.1,2,5
What to do
1Update Vite
First fixed: 8.3.7, 8.2.6, 8.1.7, 7.3.8 and 6.4.6; Vite 8.4 isn't listed as affected. Vite's advisory names 8.2.5, which is tagged on GitHub but isn't on npm; 8.2.6 has the same fix. 8.1.7 has the fix too, but Vite no longer supports 8.1 or older, so on Vite 4, 5 or an older 8.x line move to a supported one. vite-plus is fixed in 1.5.1.1,3,4,6,10
Latest safe versions checked 3 Dec
npm ls vite.
2Keep the dev server private
In our view, a dev server shouldn't face the network. If you need --host, for example in a container, we'd keep its port reachable only from your own machine, and stop the server when you're done.1,5
This page shows you how to check. It can't tell you you're safe.
Sources (11) and changelog
- Vite GHSA-p4f5: Critical, CVSS 4.0 9.1; only dev servers exposed with --host or server.host; PoC; fixed in 8.3.7, 8.2.5, 8.1.7, 7.3.8, 6.4.6, vite-plus 1.5.1 10 Nov
- CVE record: CVE-2026-140097, network-exposed development server, file disclosure and code execution 30 Nov
- Vite 8.3.7 release, 9 Nov 2026 9 Nov
- npm registry: Vite releases; 8.2.6 published 9 Nov, no 8.2.5
- Vite docs: server.host defaults to localhost; --host or 0.0.0.0 listens on all addresses
- Vite: supported versions; everything before 8.4, 8.3, 8.2, 7.3 and 6.4 is unsupported
- CISA KEV catalog: CVE-2026-140097 not listed; CVE-2025-31125 added 22 Jan 2026
- Vite GHSA-4r4m (CVE-2025-31125): only dev servers exposed with --host or server.host
- npm docs: npm ls lists installed packages
- Vite 8.2.6 changelog: same Rolldown update as 8.2.5
- cvedotnow on X: shares it as Critical 9.1, 30 Nov 2026 30 Nov
- Published.