CVE-2026-140098: Vite [beta only]: files otuside `server.fs.allow` and not included in `server.fs.deny` can be served by two requests using `?worker`
Vite is a frontend tooling framework for JavaScript. In 8.4.0-beta.1, a network-exposed development server can register a request-chosen file outside server.fs.allow in config.environments.client.safeModulePaths when processing ?worker&import or ?sharedworker&import, while ?wasm, ?init&import, and ?source&import can register request-chosen .wasm files through the same mechanism. An unauthenticated attacker can first request an outside path with one of the applicable queries and then request the same path normally, causing the safe-path check to bypass server.fs.allow and disclose the file unless server.fs.deny matches it. This issue is fixed in 8.4.0-beta.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 8.4.0-beta.2
Event History
Frequently Asked Questions
Which deployments are exposed?
Network-exposed Vite development servers running 8.4.0-beta.1 are affected. The issue concerns files outside server.fs.allow that are not matched by server.fs.deny.
What must an attacker do to disclose a file?
No authentication is required. The attacker first registers a chosen outside path using ?worker&import or ?sharedworker&import, or registers a chosen .wasm file using ?wasm, ?init&import, or ?source&import, then requests that same path normally.
Does server.fs.deny still provide protection?
Yes. The described disclosure occurs only when the target file is not matched by server.fs.deny; matching deny rules prevent the file from being served.
What is the available remediation?
Upgrade to Vite 8.4.0-beta.2, which fixes the issue.