Vite 8.4 Swaps the Dev Server Block-List for an Allow-List

Vite 8.4 landed on November 26, 2026, and its most consequential change isn't a feature — it's a shift in how the dev server decides what it is willing to serve. For the first time, it can run from an explicit allow-list instead of a block-list.

The problem: block-lists lose eventually

server.fs.strict has defaulted to true since Vite 2.7, restricting the serving of files outside the workspace root. Alongside it ships a default deny list:

ts
// server.fs.deny — default value
[
  '.env',
  '.env.*',
  '*.{crt,pem,key,p12,pfx,cer,der}',
  '.npmrc',
  '.yarnrc.yml',
  '**/.git/**',
]

The logic is reasonable: block the sensitive files you know about. But it assumes you know every route that reaches a file — and that assumption has broken repeatedly, through filesystem and HTTP parsing quirks.

A recent advisory shows the shape of the problem. GHSA-qppr-rxr4-jjq2, published November 26, affected only 8.4.0-beta.1 and was patched in 8.4.0-beta.2. A first request to /@fs/<path>?worker&import made the worker plugin register that absolute path as a safe module; a plain second request to /@fs/<path> then returned the file, because the safe-module check ran before the server.fs.allow check. Rated moderate, CVSS v4 6.9, no known CVE.

Note where the flaw lived: not in the deny list, but in a route nobody had enumerated. Every block-list carries that debt.

What changed

server.fs.strict is now typed boolean | 'extended'. Setting 'extended' applies the access checks to modules loaded by plugins through the load hook as well (except IDs starting with \0), and registers files referenced by means other than import — such as url() inside CSS.

Combine it with an empty allow list and you get allow-list semantics:

ts
// vite.config.ts
import { defineConfig } from 'vite'

export default defineConfig({
  server: {
    fs: {
      strict: 'extended',
      allow: [],
    },
  },
})

Now nothing is served unless it is referenced from the entrypoint, directly or transitively. The distinction matters: the list is no longer hand-maintained, it is derived from the project's actual reference graph.

If a plugin generates code pointing at a file that import analysis cannot see, the fix isn't to push server.fs.allow entries onto your users:

ts
// inside a transform hook
if (this.environment.mode === 'dev') {
  this.environment.addSafeModule(runtimeId)
}

That registers both the full ID and the path with query and hash stripped. Other query variants need registering separately.

The Vite team has stated the intent plainly: this becomes the default in the next major.

The rest of the release

  • Retryable dynamic imports. After an HTML spec change (whatwg/html#10327), browsers may re-fetch a module whose fetch failed. Vite 8.4 improves the preload helper so a dynamic chunk's CSS is re-fetched when the import re-executes. Implemented in Chrome 156+, Firefox 155+, and Safari Technology Preview 252.
  • Duplicate process detection. Starting a second dev server for the same project with similar options now exits with an error naming the existing URL and PID. --bypass-lock overrides it.
  • Wasm source phase imports. import source mod from './mod.wasm' yields a WebAssembly.Module.
  • Subpath imports in CSS `url()`.
  • Experimental bundled dev mode for SSR.

Real-world caveats

Allow-lists aren't free. Files read outside the reference graph — data loaded at runtime, assets produced by an external script — will 403, and you find out at first access, not at startup. Turn it on in development and exercise the rare paths before imposing it on a team.

Note too that server.fs.deny outranks the allow list, and setting it replaces the default list entirely — so don't rewrite it from scratch and drop .env on the way.

The biggest caveat: this protects the dev server, not production. The exposure appears when the dev server is reachable on the network via --host. The same surface-reduction thinking showed up earlier in outbound connection allow-lists.

Takeaway

A block-list asks you to predict every route to a file. An allow-list asks you to declare what the project actually needs — a question the project can answer. Vite 8.4 makes that a choice today and a default later; opting in early turns a surprise upgrade into a deliberate one.

Primary source: Vite 8.4 is out!