All vulnerabilities

npm

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`

Severity
Medium
Published
1 Dec 2026
Last changed
1 Dec 2026
Added to UpHeron
1 Dec 2026
Fixed in
8.4.0-beta.2
Exploit chance
0.7% in the next 30 daysHigher than 52% of CVEs. EPSS by FIRST, 1 Dec 2026
Weakness
Information exposure (CWE-200)
Also known as
GHSA-qppr-rxr4-jjq2
Sources
OSV.dev and GitHub

Description

[!IMPORTANT]

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:

  • explicitly exposes the Vite dev server to the network (using --host or server.host config option)
  • the sensitive file exists is not specified by server.fs.deny
  • Uses v8.4.0-beta.1

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/?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/ 200 with the file content. The safeModulePaths check short-circuits before the fs.allow check.
From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
vitenpm · osv:npm:vite
  • From 8.4.0-beta.1 before 8.4.0-beta.2

About vite

Weekly downloads (npm)
268,461,666npm, 1 Dec 2026

Vulnerabilities in vite

In our list
2
Published in the last 12 months
2
Critical, last 12 months
0
High, last 12 months
0
Known exploited
0
Search the list for vite

References