Access Control Bypass Affecting vite package, versions <8.4.0-beta.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.65% (53rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Access Control Bypass vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-VITE-23188823
  • published1 Dec 2026
  • disclosed30 Nov 2026
  • creditUnknown

Introduced: 30 Nov 2026

NewCVE-2026-140098  (opens in a new tab)
CWE-284  (opens in a new tab)

How to fix?

Upgrade vite to version 8.4.0-beta.2 or higher.

Overview

vite is a Native-ESM powered web dev build tool

Affected versions of this package are vulnerable to Access Control Bypass via the worker plugin's handling of ?worker&import and ?sharedworker&import queries in the development server. When a request is processed with one of these queries, the absolute file path is registered in config.environments.client.safeModulePaths via fileToDevUrl, regardless of whether that path is permitted by server.fs.allow. An attacker can first issue a GET request to /@fs/<absolute-path>?worker&import to register an arbitrary outside path, then issue a second GET request to /@fs/<absolute-path> to retrieve the file contents, because the safeModulePaths check short-circuits before the fs.allow check. The ?wasm, ?init&import, and ?source&import queries trigger the same registration for .wasm files.

Note: This is only exploitable when the Vite dev server is explicitly exposed to the network (via --host or server.host), the sensitive file is not matched by server.fs.deny, and the affected version is 8.4.0-beta.1.

CVSS Base Scores

version 4.0
version 3.1