Vulnerabilities in pkg:npm/vite
PACKAGECVE-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.
pkg:npm/vite
Vulnerability advisories affecting package pkg:npm/vite. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-qppr-rxr4-jjq2 | CVE-2026-140098 | MODERATE | Vite [beta only]: files otuside `server.fs.allow` and not included in `server.fs.deny` can be served by two requests using `?worker` |
| GHSA-r825-w8mm-5pxw | CVE-2026-112944 | MODERATE | launch-editor: Editor CLI flag misinterpretation causing arbitrary command execution for some editors |
| GHSA-587h-7wmj-h5pm | CVE-2026-112942 | HIGH | launch-editor: `fs.existsSync()` existence check can be bypassed on Windows |
| GHSA-698v-4r3x-3vcv | CVE-2026-112943 | MODERATE | launch-editor: escapeCmdArgs() omits % escaping on Windows |
| GHSA-fx2h-pf6j-xcff | CVE-2026-53571 | HIGH | vite: `server.fs.deny` bypass on Windows alternate paths |
| GHSA-v6wh-96g9-6wx3 | CVE-2026-53632 | MODERATE | launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows |
| GHSA-c27g-q93r-2cwf | CVE-2024-52011 | HIGH | launch-editor vulnerable to command injection via the crafted request on Windows |
| GHSA-4w7w-66w2-5vf9 | CVE-2026-39365 | MODERATE | Vite Vulnerable to Path Traversal in Optimized Deps `.map` Handling |
| GHSA-v2wj-q39q-566r | CVE-2026-39364 | HIGH | Vite: `server.fs.deny` bypassed with queries |
| GHSA-p9ff-h696-f583 | CVE-2026-39363 | HIGH | Vite Vulnerable to Arbitrary File Read via Vite Dev Server WebSocket |
| GHSA-4r4m-qw57-chr8 | CVE-2025-31125 | MODERATE | Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query |
| GHSA-93m4-6634-74q7 | CVE-2025-62522 | MODERATE | vite allows server.fs.deny bypass via backslash on Windows |
| GHSA-g4jq-h2w9-997c | CVE-2025-58751 | LOW | Vite middleware may serve files starting with the same name with the public directory |
| GHSA-jqfw-vq24-v9c3 | CVE-2025-58752 | LOW | Vite's `server.fs` settings were not applied to HTML files |
| GHSA-859w-5945-r5v3 | CVE-2025-46565 | MODERATE | Vite's server.fs.deny bypassed with /. for files under project root |
| GHSA-xcj6-pq6g-qj4x | CVE-2025-31486 | MODERATE | Vite allows server.fs.deny to be bypassed with .svg or relative paths |
| GHSA-356w-63v5-8wf4 | CVE-2025-32395 | MODERATE | Vite has an `server.fs.deny` bypass with an invalid `request-target` |
| GHSA-x574-m823-4x7w | CVE-2025-30208 | MODERATE | Vite bypasses server.fs.deny when using ?raw?? |
| GHSA-vg6x-rcgg-rjx6 | CVE-2025-24010 | MODERATE | Websites were able to send any requests to the development server and read the response in vite |
| GHSA-mv48-hcvh-8jj8 | CVE-2022-35204 | HIGH | Vite before v2.9.13 vulnerable to directory traversal via crafted URL to victim's service |
| GHSA-9cwx-2883-4wfx | CVE-2024-45811 | MODERATE | Vite's `server.fs.deny` is bypassed when using `?import&raw` |
| GHSA-64vr-g452-qvp3 | CVE-2024-45812 | MODERATE | Vite DOM Clobbering gadget found in vite bundled scripts that leads to XSS |
| GHSA-353f-5xf4-qw67 | CVE-2023-34092 | HIGH | Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//) |
| GHSA-8jhw-289h-jh2g | CVE-2024-31207 | MODERATE | Vite's `server.fs.deny` did not deny requests for patterns with directories. |
| GHSA-c24v-8rfc-w8vw | CVE-2024-23331 | HIGH | Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem |
| GHSA-92r3-m2mg-pj97 | CVE-2023-49293 | MODERATE | Vite XSS vulnerability in `server.transformIndexHtml` via URL payload |
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"
}
}