CVE-2026-140098: Vite [beta only] Files Otuside `server.fs.allow` And Not Vulnerability

MODERATE
Advisory Identifier: GHSA-qppr-rxr4-jjq2
CWE-200
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2026-140098
GHSA Identifier GHSA-qppr-rxr4-jjq2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Vite [beta only]
Package Ecosystem npm
Published Date
Last Updated

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.

vite fixed: 8.4.0-beta.2
npm install vite@8.4.0-beta.2
Verify Direct and Transitive Dependencies

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

> [!IMPORTANT] > **This advisory only affects beta versions.** ### Summary With 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. ### Impact Only apps that match the following conditions are affected: - 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)) - the sensitive file exists is not specified by [server.fs.deny](https://vite.dev/config/server-options#server-fs-deny) - Uses v8.4.0-beta.1 ### Details 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: 1. `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`. 2. `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). ### PoC 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:... ```

CVE-2026-140098 Affected Vite [beta only] Versions

1 component(s)
Fixed Versions:
8.4.0-beta.2
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?
CVE-2026-140098 is a security vulnerability in Vite [beta only] involving files otuside `server.fs.allow` and not included in `server.fs.deny` can be served by two requests using `?worker` under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Vite [beta only] versions are affected?
Affected versions include releases prior to 8.4.0-beta.2 across affected packages: vite.
What version fixes CVE-2026-140098?
Upgrading to 8.4.0-beta.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is vite affected?
Yes, vite is affected in releases prior to 8.4.0-beta.2. Upgrade your dependency to 8.4.0-beta.2 or later.
What CWE is associated with CVE-2026-140098?
CVE-2026-140098 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2026-140098?
Run the dependency tree command: 'npm ls vite'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}