The Vite dev server is meant to run locally. But if you expose it to your LAN with --host or run it on a staging server, more people can reach it. In those cases, people often do not know which files in the project it will return.
Until now, Vite has protected files with a list of "files that must not be returned" (a blocklist). This approach stops .env and key files with server.fs.deny. The November 26 Vite 8.4 announcement notes that the team has kept closing loopholes in this approach, and says it now lets you choose an allowlist approach that "returns only files referenced from the entry point." This approach is planned to become the default in the next major version.
In this article, after checking the announcement and the configuration docs, we ran the same small project on 8.3.8 and 8.4.0 to see which files are returned and which get a 403. We also suggest steps for trying it first on a site under development.
What the announcement says
The key points of the announcement on the official Vite 8.4 blog (the "Allow-list Based File Serve Check" section) are as follows.
- The
server.fscheck is a feature for cases where an attacker can reach the dev server, and it was added in Vite 2.7. Until now, it used a blocklist approach that enumerates files users and Vite should handle with care - The team has kept fixing bypasses that exploit quirks in file system and HTTP parsing, but because attacks are increasing, 8.4 introduces a stricter allowlist approach
server.fs.strict: 'extended'extends the check to modules loaded by plugins. References are now also registered from places such as CSSurl(), in addition toimport- Combining
server.fs.strict: 'extended'andserver.fs.allow: []gives an approach that allows only files referenced from the entry point (including references that can be traced). This is planned to become the default in the next major version - Plugins that create modules referencing files by means other than
importcan register them withthis.environment.addSafeModule
In the configuration docs (server.fs.strict), the type is now boolean | 'extended', and the default is still true. Simply upgrading to 8.4 changes nothing.
Results on the same project
For testing, we created the following small project.
index.htmlloadssrc/style.csswith<link>andsrc/main.jswith<script>src/main.jsimportssrc/util.js.src/unused.jsis not referenced from anywheresrc/style.cssreferences an image withurl('./assets/bg.svg')- Place
notes.txt(a file containing only a dummy string) andpublic/robots.txtdirectly under the root
In an isolated test environment (Linux, Node.js v22.23.5), we started a dev server listening only on 127.0.0.1, requested files in the same order as a browser (HTML, JS, CSS, images), and then requested the remaining files. Below are the rows where the result differed by configuration (with the default settings, the five files traceable from the entry point also returned 200).
== vite 8.4.0 / default (8.3.8 の既定、8.4.0 の strict: 'extended' のみも同じ)
200 /src/unused.js
200 /notes.txt
200 /package.json
200 /@fs<project>/notes.txt
== vite 8.4.0 / allowlist (strict: 'extended' + allow: [])
200 /
200 /src/main.js
200 /src/util.js
200 /src/style.css
200 /src/assets/bg.svg
403 /src/unused.js
403 /notes.txt
403 /package.json
403 /@fs<project>/notes.txt

With the default settings, on both 8.3.8 and 8.4.0, src/unused.js, which is not referenced from anywhere, and notes.txt and package.json directly under the root returned 200. They are also returned for requests with an absolute path under /@fs/. This is because they are inside the default server.fs.allow (the workspace root, or the project root if none is found) and do not match the server.fs.deny list either. Specifying only strict: 'extended' gave the same result as the defaults.
With the allowlist approach, only the five files traceable from the entry point index.html returned 200, and the remaining four returned 403. The image referenced with CSS url() was also allowed as a reference from the entry point.
How it differs from allow: [] on 8.3.8
When we specified only server.fs.allow: [] on 8.3.8, index.html, main.js and util.js were returned, but style.css, loaded with <link>, and the image inside it returned 403. The 8.4 changelog entries "register references in HTML to safe modules" and "register more references to safe modules" appear to account for this difference. If you try the same thing on 8.3.x or earlier, even ordinary stylesheets get blocked.
Points to watch
Within what we confirmed in our test environment, knowing the following three points in advance will save you confusion.
- Requests made before the entry point return 403. With the allowlist approach, directly requesting
src/util.jsor images before loadingindex.htmlreturned 403. After the entry point was loaded, they returned 200. The results suggest that references are registered while the entry point is being transformed. This is not a problem when you open the site normally in a browser, but the results change if tests or scripts fetch individual files directly - Files in
publicare not covered.public/robots.txtreturned 200 even with the allowlist approach. Theserver.fs.denydocs also say that files in thepublicdirectory are all served without filtering. The practice of not putting secrets there does not change strict: 'extended'alone does not narrow anything. In this project,extendedalone gave the same result as the defaults. Files are narrowed only in combination withallow: []
We have not tested setups that combine frameworks or plugins (Nuxt, SvelteKit, Laravel's laravel-vite-plugin and so on). If a plugin loads files by means other than import, pages may break with 403 errors until it supports addSafeModule.
Steps to try it on a site under development (editorial suggestion)
Before you try this, check which version you are using now. On November 10, a Critical-severity advisory (GHSA-p4f5-76q4-ffq7) was published in the Vite repository. If you expose the dev server to the network with --host or server.host, a crafted request can read files outside the allow list or execute code on the server. The fixed versions are 8.3.7, 8.1.7, 7.3.8, and 6.4.6, released on November 9, plus 8.2.6 in the 8.2 line (the advisory says 8.2.5, but the version on npm is 8.2.6). The 8.3.8 and 8.4.0 versions we tested this time are post-fix versions. As of November 30, this advisory is not listed in the GitHub Advisory Database. We therefore expect that npm audit, which relies on that database, does not warn about it yet.
- Upgrade to 8.4. Upgrade with
npm i -D vite@^8.4.0, then confirm that the dev server and the production build still work as before with the default settings - Try the allow-list mode in your development settings. Add the following to
vite.configand open every page on the dev server
// vite.config.js(開発サーバーだけに効く設定)
export default {
server: {
fs: {
strict: 'extended',
allow: [],
},
},
}
- Find every 403. Look for files that returned 403 in the Network tab of your browser's developer tools and in Vite's log in the terminal. If a file is needed, first check whether it is referenced from an entry point. If a plugin loads it, either wait for a plugin update or add it individually to
server.fs.allow - Switch dev servers that are exposed externally first. The more a test environment is exposed with
--host, the more it benefits. For environments used only on your own machine, it is fine to switch later, in line with the default in the next major version
The seven advisories for the Vite dev server and launch-editor published in October, and the cautions for configuring server.fs.deny yourself, were covered in our article on Vite dev server vulnerabilities. The allow-list mode does not block such individual loopholes one by one; instead, it narrows down the files that can be served from the start. The prerequisites for migrating if you use Vite+ are summarized in our article on Vite+ 1.0. The November 10 advisory also affects Vite+ 1.5.0 and earlier, and it is fixed in 1.5.1.
Scope of verification
On November 27, 2026, we checked the announcement in the vitejs/vite repository (docs/blog/announcing-vite8-4.md on main), the configuration docs at tag v8.4.0 (server.fs.strict, allow, and deny in docs/config/server-options.md), the plugin docs (docs/guide/api-environment-plugins.md), packages/vite/CHANGELOG.md, and the publication dates on the npm registry (document research). For the serving results, we installed vite 8.3.8 and 8.4.0 in an isolated test environment (Linux, Node.js v22.23.5) and sent requests with curl to the dev server on 127.0.0.1 (hands-on testing with a test project and dummy files). We did not check the browser and HMR, setups combining frameworks or plugins, or a server exposed with
--host. On November 30, we rechecked the announcement on vite.dev, the repository advisory (GHSA-p4f5-76q4-ffq7) and whether it is listed in the GitHub Advisory Database, and the latest version of each line on npm. No new version has been released after 8.4.0.
For reviewing the development environment of a site in progress or planning dependency updates, please contact us through our consultation on development, AI, and automation.
References
- Vite 8.4 is out!(vite.dev)
- Server Options — server.fs.strict(vitejs/vite — docs/config/server-options.md)
- Environment API for Plugins — Registering Safe Modules
- vitejs/vite — packages/vite/CHANGELOG.md(8.4.0)
- vitejs/vite — Remote code execution using
__vite-browser-externalvirtual module(GHSA-p4f5-76q4-ffq7) - vite(npm)









