CVE-2026-140098: Vite [beta only] Files Otuside `server.fs.allow` And Not Vulnerability
MODERATECVE-2026-140098 is a MODERATE files otuside `server.fs.allow` and not vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Vite [beta only] libraries in the npm ecosystem. The issue involves files otuside `server.fs.allow` and not included in `server.fs.deny` can be served by two requests using `?worker`. Remediation is available by upgrading affected packages to version 8.4.0-beta.2.
CVE-2026-140098 at a Glance
How to Fix CVE-2026-140098
To remediate this vulnerability, upgrade all affected Vite [beta only] dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install vite@8.4.0-beta.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls vite
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-140098, inspect your project dependencies using npm:
npm ls vite
Analyze the terminal output to locate any version of Vite [beta only] in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.4.0-beta.2), your application is affected.
Note: The npm ls vite command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Vite [beta only], software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-140098 Affected Vite [beta only] Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vite
|
npm |
≥ 8.4.0-beta.1
< 8.4.0-beta.2
All 1 versions
8.4.0-beta.1
|
8.4.0-beta.2
|
References
Frequently Asked Questions
What is CVE-2026-140098?
Which Vite [beta only] versions are affected?
What version fixes CVE-2026-140098?
Is vite affected?
What CWE is associated with CVE-2026-140098?
How can I check npm dependencies for CVE-2026-140098?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qppr-rxr4-jjq2",
"modified" : "2026-12-01T19:02:48Z",
"published" : "2026-12-01T19:02:48Z",
"aliases" : [ "CVE-2026-140098" ],
"summary" : "Vite [beta only]: files otuside `server.fs.allow` and not included in `server.fs.deny` can be served by two requests using `?worker`",
"details" : "> [!IMPORTANT]\n> **This advisory only affects beta versions.**\n\n### Summary\n\nWith 8.4.0-beta.1, the contents of files that are outside [`server.fs.allow`](https://vite.dev/config/server-options#server-fs-allow) and not included in [`server.fs.deny`](https://vite.dev/config/server-options#server-fs-deny) can be returned to the browser.\n\n### Impact\n\nOnly apps that match the following conditions are affected:\n\n- explicitly exposes the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host))\n- the sensitive file exists is not specified by [server.fs.deny](https://vite.dev/config/server-options#server-fs-deny)\n- Uses v8.4.0-beta.1\n\n### Details\n\nIn 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:\n\n1. `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`.\n2. `GET /@fs/<absolute-path>` 200 with the file content. The safeModulePaths check short-circuits before the `fs.allow` check.\n\nOnly `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.\n\nThis 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).\n\n### PoC\n\nMinimal reproduction (two requests):\n\n```\n# 1) Before registration — correctly denied\nGET /@fs/etc/passwd\n-> 403 Restricted (\"The request id /etc/passwd is outside...\")\n\n# 2) Register the path via the worker query\nGET /@fs/etc/passwd?worker&import\n-> 200\n-> body: export default function WorkerWrapper(options) {\n return new Worker(\"/@fs/etc/passwd?worker_file&type=module\", ...)\n }\n\n# 3) Read — now allowed\nGET /@fs/etc/passwd\n-> 200 (text/javascript)\n-> body: root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:...\n```",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "vite"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.4.0-beta.1"
}, {
"fixed" : "8.4.0-beta.2"
} ]
} ],
"versions" : [ "8.4.0-beta.1" ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/security/advisories/GHSA-qppr-rxr4-jjq2"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-140098"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/pull/23168"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/pull/24206"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/commit/a78fb8a28db01e83611120012bd5d1189bab68aa"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/commit/e258ce140eef64cf89ff38c410125abd8726f274"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vitejs/vite"
}, {
"type" : "WEB",
"url" : "https://github.com/vitejs/vite/releases/tag/v8.4.0-beta.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T19:02:48Z",
"nvd_published_at" : "2026-11-30T23:17:24Z"
}
}