On this page
- What does vite --host actually do?
- What was the CVE-2026-39364 bug?
- Which Vite versions are affected, and which are fixed?
- Is CVE-2026-39364 the only dev server file leak?
- How do I check whether my dev server is exposed?
- What should I rotate, and in what order?
- Was anything exploited?
- Am I affected? A three-state self-test
- What can an outside scan see here?
- What if the dev server is part of how we deploy?
An exposed Vite dev server is one started with --host or server.host on a machine other than your own laptop. CVE-2026-39364 let specific query suffixes read files that server.fs.deny should block, such as .env. Update to Vite 8.0.5 or 7.3.2 or later, or 6.4.5 on the v6 line, stop exposing the dev server, and rotate every secret in the env files it could read.
| Fact | Detail | Source |
|---|---|---|
| CVE | CVE-2026-39364, server.fs.deny bypassed with queries | CVE record |
| Severity | GitHub: Moderate, CVSS 6.9. CVE record: CVSS v4.0 8.2, v3.1 7.5 | GHSA-v2wj-q39q-566r |
| Published | 6 April 2026 (GitHub), 7 April 2026 (CVE record), updated 17 August 2026 | CVE record |
| Fixed | Vite 8.0.5, 7.3.2, vite-plus 0.1.16. The v6 branch is covered by a separate advisory, fixed in 6.4.5 (see the version table) | GHSA-v2wj-q39q-566r, GHSA-8g5g-mxqh-grgj |
| Condition | The dev server is exposed to the network with --host or server.host | GHSA-v2wj-q39q-566r |
| Checked | 2 November 2026 | this page |
This page covers the Vite dev server only. It does not claim a built site is affected, and it does not describe any named victim. The wider October picture is in the meltdown tracker, and the other framework guides cover similar version checks.
What does vite --host actually do?
By default the Vite dev server listens on localhost. The server options docs say that setting server.host to 0.0.0.0 or true makes it listen on all addresses, including LAN and public ones. The --host command line flag does the same job.
People set it for good reasons. They test on a phone, run the server inside a container or a remote workspace, or share a preview with a colleague. The trouble starts when that machine also has a public address, a published port or a tunnel, and the server stays up for days.
A dev server is built for one trusted person at a keyboard. It serves your source tree on demand, and it will serve whatever the access rules allow to anyone who can reach the port.
What was the CVE-2026-39364 bug?
Vite blocks sensitive files with server.fs.deny. Per the docs, the default list covers .env, .env.*, certificate and key files, .npmrc, .yarnrc.yml and .git folders. The advisory says files on that list could be returned with an HTTP 200 when certain query parameters were appended to the request. The patch stops the bypass.
The advisory sets three conditions, and all must hold:
- The dev server is explicitly exposed to the network with
--hostorserver.host. - A sensitive file sits inside a directory the server is allowed to serve.
- That file is blocked by a
server.fs.denypattern, which is the check that failed.
We do not reproduce the request. The point for an owner is that the default deny list was the only thing standing between a reachable port and your env files, and for these versions it did not hold.
Two ratings exist. GitHub rates it Moderate (6.9), partly because of condition 1. The CVE record carries CVSS v4.0 8.2 and v3.1 7.5, and Red Hat lists 7.5 with no available mitigation. If your server was exposed, the High number is the one that matches your situation; how to weigh a CVE rating explains why the scores differ.
Which Vite versions are affected, and which are fixed?
The main advisory lists two branches (8 and 7). A third, v6, got its own advisory on 21 October 2026 because a fix was missed in a backport.
| Branch | Affected | Fixed | Source and date |
|---|---|---|---|
| Vite 8 | 8.0.0 to 8.0.4 | 8.0.5 | GHSA-v2wj-q39q-566r, 6 April 2026 |
| Vite 7 | 7.1.0 to 7.3.1 | 7.3.2 | GHSA-v2wj-q39q-566r, 6 April 2026 |
| Vite 6 | 6.4.4 only | 6.4.5 | GHSA-8g5g-mxqh-grgj, 21 October 2026, CVE-2026-118662 |
| vite-plus | up to 0.1.15 | 0.1.16 | GHSA-v2wj-q39q-566r |
The v6 case is worth a second look. The advisory says a patch was not backported alongside another fix in 6.4.4, so someone who updated to 6.4.4 for another reason can still be exposed. At our check on 2 November 2026 Vite's releases showed 8.3.5 and 6.4.5 (both 21 October) and 7.3.7 (6 October) as the latest in their lines.
Vite 7.0.x is outside the range in the CVE record, but the other advisories below reach it, so do not treat it as a stopping point.
Is CVE-2026-39364 the only dev server file leak?
No. Vite published eight advisories in 2026, and several share the same exposure condition. We list the ones that touch file access. Each says the dev server must be exposed with --host or server.host, except where noted.
| Advisory | What it exposes | Fixed in | Published |
|---|---|---|---|
| CVE-2026-39363 (High, 8.2) | Arbitrary file read through the dev server WebSocket | 8.0.5, 7.3.2, 6.4.2 | 6 April 2026 |
| CVE-2026-39365 | .map files outside the project root | 8.0.5, 7.3.2, 6.4.2 | 6 April 2026 |
| CVE-2026-53571 | server.fs.deny bypass on Windows alternate paths | 8.0.16, 7.3.5, 6.4.3 | 1 June 2026 |
| CVE-2026-112946 | Files outside server.fs.allow on non-Windows | 8.3.3, 8.2.4, 8.1.6, 7.3.7, 6.4.4 | 6 October 2026 |
| CVE-2026-112947 | First 4 bytes of files, on 8.2 and 8.3 only | 8.3.3, 8.2.4 | 6 October 2026 |
The takeaway is practical. Fixing one CVE by pinning to the exact patched version leaves you behind. At our check, being on 8.3.5, 7.3.7 or later in 7.x, or 6.4.5 covers every row in both tables for those branches. Another 6 October advisory (CVE-2026-112945, Low) concerns cross origin script execution through custom middleware and is fixed in the same releases.
How do I check whether my dev server is exposed?
Do these on the machine, container or workspace that runs vite. They read state and change nothing.
- Find every
viteprocess: the commands in yourpackage.jsonscripts, your container start commands, your CI jobs and any process manager entries. - Look for
--hostor ahostsetting invite.config.*. A setting oftrueor0.0.0.0means all addresses. - List listening sockets on the machine. A Vite port bound to
127.0.0.1stays on that machine. One bound to all addresses can be reached by anything that can route to it. - Check whether the port is published: a container port mapping, a cloud security group, a router forward, a tunnel or a port-sharing feature of a remote workspace.
- Read the installed version, not the range in
package.json: ask the package manager and compare with the version table above. - Check
server.allowedHosts. The docs warn that setting it totruelets any website send requests to your dev server through DNS rebinding. An explicit list is the safer setting.
If the answer to the first four is "yes, exposed, for days", assume the env files were readable during that time and move to the rotation section.
What should I rotate, and in what order?
Patching closes the door. It does not return anything that was read before. If the dev server was reachable, treat everything in the env files as read.
- Rotate first. Cloud provider keys, database passwords, payment, email and SMS provider keys, signing and session secrets, and any token in
.env,.env.localor other env files in the served tree. The step-by-step secret rotation order gives an order that avoids breaking production. - Then update Vite and stop exposing the server.
- Check usage logs at each provider for use you do not recognise since the server was first exposed. Cloud consoles and API providers keep key usage history.
- Check the web server logs in front of the dev server, if any, for requests to env file paths from addresses you do not know. The 30-second check explains what such requests look like and what they mean.
To see what a published env file costs in practice, one Cloudflare Pages case is worth a read.
A separate point from the Vite docs: variables prefixed VITE_ are bundled into client code and shipped to every visitor. Do not keep API keys in them, whether or not you ever ran --host.
Was anything exploited?
Attackers are already looking for these servers. F5 Labs counted Vite file-read attempts in its sensors jump from 1,732 events over the previous three months to more than 32,000 in August 2026, aimed at .env files, AWS and Azure credential files and Terraform state. The Vite advisories themselves carry no exploitation statement, so treat any scale claim beyond F5's as unconfirmed until it links a source.
Scanning for exposed env files is routine, and the env file campaigns of 2026 do not need a Vite bug. The advice is the same either way: nothing that holds secrets should answer on a public address.
Am I affected? A three-state self-test
Am I affected? Where you stand right now
A check from outside can see that something answers on an address and which version it reports. It cannot see your launch flags, your lockfile, or whether anyone read your files.
- Detected A Vite dev server answers on a public address, or the version it reports is below the fixed release for its branch. Take it offline now, update, and rotate every secret in the env files it could read.
- Unknown You run Vite but cannot say how it was started, where, or for how long. This is the common case. Read the start commands, the config and the open ports on the machine, and the installed version.
- Confirmed by owner evidence You hold the lockfile or package listing showing a fixed version, and proof the server listens only on localhost or sits behind a network rule. The bug is closed on that host. Whether files were read earlier is a separate question for your logs.
No scan, ours included, moves you from "unknown" to "confirmed".
What can an outside scan see here?
The free scan reads the stack your site serves and matches each version to known vulnerabilities. It also checks for .env, .git and backups reachable from outside, and for panels, consoles and debug pages left online. If a dev server answers on your domain or its address, that is the kind of thing it can flag.
It is a lookup. It can say a version is affected, not whether your setup is exposed. It cannot see how a process was started inside a container, or whether anyone read a file last month. The limits are laid out in what outside-in scans miss.
What if the dev server is part of how we deploy?
Some teams run vite on a remote box because a shared preview is useful. If so, make the exposure narrow rather than assume it is fine.
- Bind to localhost (the same care applies to exposed Docker API ports on remote boxes) and reach it through an SSH tunnel or a VPN your team already uses.
- Put the port behind an allowlist at the network layer, so only named addresses connect.
- Set an explicit
server.allowedHostslist instead oftrue. - Keep real secrets out of the project folder on that machine. Use dummy values for previews.
- Rebuild the project and serve the output as static files for anything others must see regularly.
If you have to ask a host or colleague, send exact questions:
Which machines run the Vite dev server, with what
--hostorserver.hostsetting, and which of them have a port reachable from outside our network? Which Vite version is installed on each, read from the lockfile or package listing? Has anything other than test values ever been kept in env files on those machines?
For the wider habit of treating dev machines as part of your surface, the who-does-what response checklist covers who does what when something might have leaked.
Questions people ask
Is vite --host safe to use?
It is a deliberate choice, not a default. The Vite docs say the server listens on localhost unless you set a host, and that setting it to 0.0.0.0 or true listens on all addresses, including public ones. Use it only on a network you control, keep Vite updated, and do not leave it running on a machine with a public address.
Does CVE-2026-39364 affect my production site?
Only if you serve your site by running the Vite dev server. A built site served from static files, a CDN or a web server does not run the dev server. The advisory describes the dev server and requires it to be exposed with --host or server.host. A preview server was not named in the advisory we read.
My .env was exposed by a Vite dev server. What do I rotate?
Every value in every env file the server could read, not only the ones your app uses. That includes cloud keys, database passwords, payment and email provider keys, and signing secrets. Rotate first, then update Vite, because patching does not undo a read that already happened.
How do I know which Vite version I run?
In the project folder, ask the package manager which version is installed, for example npm ls vite, and read the lockfile for the resolved version. A version in package.json with a caret is a range, not the installed build. Check every project, container and CI image that runs a dev server.
Can a website scan tell me if my dev server leaked my secrets?
No. A scan can see that something answers on a public address and which version it reports. It cannot see whether someone already read your files. Only your access logs and your provider's key usage logs can speak to that.
Sources
- GHSA-v2wj-q39q-566r: server.fs.deny bypassed with queries (vitejs/vite advisory)The CVE-2026-39364 advisory: three conditions, affected and patched versions. Checked 24 October 2026.
- CVE-2026-39364 (CVE record, MITRE CVE services)Description, affected ranges, CVSS v4.0 8.2 and v3.1 7.5, published 7 April 2026, updated 17 August 2026. Checked 24 October 2026.
- GHSA-8g5g-mxqh-grgj: server.fs.deny bypassed with queries for v6Vite 6.4.4 missed a backport. Now carries CVE-2026-118662. Published 21 October 2026, checked 2 November 2026.
- GHSA-p9ff-h696-f583: Arbitrary file read via Vite dev server WebSocket (CVE-2026-39363)A second April 2026 file read, High severity, same exposure condition.
- GHSA-4w7w-66w2-5vf9: Path traversal in optimized deps .map handling (CVE-2026-39365)
- GHSA-fx2h-pf6j-xcff: server.fs.deny bypass on Windows alternate paths (CVE-2026-53571)Published 1 June 2026.
- GHSA-rq7h-c2jc-7f22: files outside server.fs.allow served on non-Windows (CVE-2026-112946)Published 6 October 2026.
- GHSA-vfpm-58rq-9qcg: first 4 bytes of files exposed by ?vite-wasm-instance (CVE-2026-112947)Published 6 October 2026. Affects 8.2 and 8.3 only.
- GHSA-9jrq-w75r-8gcw: cross origin script execution through custom middleware (CVE-2026-112945)Low severity, published 6 October 2026.
- Vite security advisories index (vitejs/vite)Lists the eight 2026 advisories used on this page, with no new ones since 21 October. Checked 2 November 2026.
- Vite docs: server options (server.host, allowedHosts, fs.deny)Defaults and the DNS rebinding warning for allowedHosts: true.
- Vite docs: env variables and modesVITE_ prefixed variables are bundled into client code.
- Red Hat: CVE-2026-39364Red Hat's own CVSS v3 7.5 rating and its note that no mitigation is available.
- F5 Labs: Cloud takeover, mass scanning for exposed Vite endpoints (CVE-2026-39364)Scanning analysis of August 2026 honeypot traffic, published 11 September 2026. Source of the 32,000 event figure. Read 2 November 2026.
Facts on this page are dated and point at the primary source next to them. If a vendor status changes after the date shown, the vendor's page wins; tell us at support@run.cloud and we will update it.