CVE-2026-140097
CriticalCVSS 9.1Exploitation Probability (EPSS)
High risk80th percentile - higher than 80% of all known CVEs
Summary
In Vite (versions 4.0.0 through 6.4.6, 7.3.8, 8.1.7, 8.2.5, 8.3.7, and vite-plus before 1.5.1), a network-exposed development server embeds request-derived module identifiers into trusted generated JavaScript without escaping. A remote unauthenticated attacker can inject an import that adds an outside file to the server.fs module allow list and reach server-side evaluation, leading to disclosure of local files and arbitrary code execution in the development-server process.
Risk Assessment
Disclosure of local files and arbitrary code execution on the development server can lead to environment compromise and data theft. The risk primarily affects development servers exposed to the network.
Recommendation
Update Vite to version 6.4.6, 7.3.8, 8.1.7, 8.2.5, or 8.3.7, and vite-plus to 1.5.1. Avoid exposing the development server to untrusted networks.
Other vulnerabilities in Vite
See all- CVE-2025-31486Medium
Vite is a frontend tooling framework for JavaScript. The contents of arbitrary files can be returned to the browser. By adding ?.svg with ?.wasm?init or with sec-fetch-dest: script header, the server.fs.deny restriction was able to bypass. This bypass is only possible if the file is smaller than build.assetsInlineLimit (default: 4kB) and when using Vite 6.0+. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. This vulnerability is fixed in 4.5.12, 5.4.17, 6.0.14, 6.1.4, and 6.2.5.
- CVE-2025-31125MediumActively exploited
Vite is a frontend tooling framework for javascript. Vite exposes content of non-allowed files using ?inline&import or ?raw?import. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. This vulnerability is fixed in 6.2.4, 6.1.3, 6.0.13, 5.4.16, and 4.5.11.
- CVE-2025-30208Medium
Vite versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 have a vulnerability that bypasses file access restrictions outside the allowed list. Adding `?raw??` or `?import&raw??` to the URL bypasses the limitation and returns the file content if it exists. Only apps explicitly exposing the Vite dev server to the network are affected.
- CVE-2026-140098Medium
In Vite 8.4.0-beta.1, a network-exposed development server can register a request-chosen file outside server.fs.allow in config.environments.client.safeModulePaths when processing ?worker&import or ?sharedworker&import, while ?wasm, ?init&import, and ?source&import can register request-chosen .wasm files through the same mechanism. An unauthenticated attacker can disclose a file outside the allowed scope unless server.fs.deny matches it.
- CVE-2026-137191High
Vite+ from 0.2.9 until 1.5.1 downloads the pinned pnpm package manager through download_package_manager and executes it without comparing the bytes to a trusted digest. A cloned repository's .npmrc can select an attacker-controlled registry, allowing substituted pnpm bytes to run during a new installation, upgrade, or ephemeral CI setup.
- CVE-2026-137190High
Vite+ from 0.3.3 until 1.5.1 in the vp env use path can place an unvalidated package-manager version from a repository-selected registry into generated shell export statements. A cloned repository's .npmrc can direct the latest dist-tag lookup to an attacker-controlled registry, and a returned value containing shell syntax reaches the shell wrapper without strict semver validation.
- CVE-2026-118662Medium
From 6.4.4 until 6.4.5, the Vite development server can evaluate server.fs.deny before stripping loader query parameters such as ?raw, ?import&raw, or ?import&url&inline. When the development server is exposed to the network and a sensitive file is inside server.fs.allow but matched by server.fs.deny, an unauthenticated attacker can append one of these queries and retrieve the denied file.
- CVE-2026-112947Medium
Vite from 8.2.0 until 8.2.4 and 8.3.3 can return the first 4 bytes of files outside the server.fs setting to the browser via a request containing ?vite-wasm-instance. The internal Wasm plugin's load hook removes the query and reads the path directly from disk without applying server.fs checks, and a WebAssembly parse error discloses the first 4 bytes of the file.
- CVE-2026-112946Medium
Vite prior to 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3 can record a root-relative browser URL in safeModulePaths instead of the cleaned resolved module identifier. On a network-accessible, non-Windows development server, an imported project file whose URL matches an absolute host path can authorize a later raw-filesystem request for that host file, provided server.fs.deny does not block it.
- CVE-2026-112945Low
In Vite prior to 6.4.4, 7.3.7, 8.1.6, 8.2.4, and 8.3.3, applications using custom middleware are vulnerable when they pass an unchanged browser request URL to server.transformIndexHtml. getHtmlFilename uses the query-bearing request URL to resolve an existing local file while preserving attacker-supplied leading slashes in the generated proxy module URL. If the transformed HTML contains an inline module script and a victim browser loads the crafted development-server page, the leading double slash makes the browser fetch and execute an attacker-controlled module.
Original NVD description (English source)
Vite is a frontend tooling framework for JavaScript. From 4.0.0 until 6.4.6, 7.3.8, 8.1.7, 8.2.5, and 8.3.7 in Vite, and prior to 1.5.1 in vite-plus, a network-exposed development server embeds request-derived module identifiers from the __vite-browser-external:<suffix> and __vite-optional-peer-dep:<suffix> virtual modules into trusted generated JavaScript without escaping. A remote unauthenticated attacker can inject an import that adds an outside file to the server.fs module allow list and can reach server-side evaluation through new Worker or import.meta.glob processing, allowing disclosure of local files and arbitrary code execution in the development-server process. This issue is fixed in Vite 6.4.6, 7.3.8, 8.1.7, 8.2.5, and 8.3.7, and in vite-plus 1.5.1.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

