Skip to main content
Menu
CVEs

Vite remote code execution in development server

Affects Vite dev servers explicitly exposed to the network via --host or server.host. Fixed in Vite 6.4.6, 7.3.8, 8.1.7, 8.2.5, and 8.3.7, and vite-plus 1.5.1.

CVE-2026-140097Published November 30, 2026, updated

9.1CriticalCNA
Exploited
No known exploitation
Fix
Fixed in vite 6.4.6, 7.3.8, 8.1.7, 8.2.5, 8.3.7 · vite-plus 1.5.1
Who is exposed
Specific setups only

Summary

Vite and vite-plus, JavaScript frontend tooling, have a flaw in their development server that lets a remote attacker without logging in inject a crafted import into generated code. This can expose local files and run arbitrary code inside the development-server process.

Written by a model

Original description

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.

Who should check

Teams running the Vite dev server exposed to the network with --host or server.host, using vite or vite-plus

“explicitly exposes the Vite dev server to the network”

github.com

What to do

  1. Check whether your setup matches what the bug needs.

    Vite dev server explicitly exposed to the network via --host or server.host
  2. Upgrade to a fixed version: vite 6.4.6, 7.3.8, 8.1.7, 8.2.5, 8.3.7 · vite-plus 1.5.1.

Check your systems with an agent

Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.

Check whether my systems are affected by CVE-2026-140097 (Vite: Remote code execution using `__vite-browser-external` virtual module), using the cve.now data below.

Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.

What cve.now has for CVE-2026-140097 (entry last updated 2026-11-30):
Affected:
- vitejs vite: from 4.0.0, fixed in 6.4.6; from 7.0.0, fixed in 7.3.8; from 8.0.0, fixed in 8.1.7; from 8.2.0, fixed in 8.2.5; from 8.3.0, fixed in 8.3.7
- vitejs vite-plus: fixed in 1.5.1
Fixed versions: 6.4.6, 7.3.8, 8.1.7, 8.2.5, 8.3.7, 1.5.1.
Conditions (all must be true for the bug to be hit):
- Vite dev server explicitly exposed to the network via --host or server.host (source: https://github.com/vitejs/vite/security/advisories/GHSA-p4f5-76q4-ffq7)
Setup: the bug needs a feature or setting that is off by default or uncommon. Check whether each asset has it on.
Attacker needs: network access, no login, no user action.
CISA KEV: CVE-2026-140097 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-140097 only. If you also check another CVE, look up its own KEV status; never assume it from this one.

How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.

Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/vitejs/vite/security/advisories/GHSA-p4f5-76q4-ffq7
- https://github.com/vitejs/vite/pull/24043
- https://github.com/vitejs/vite/pull/24044
- https://github.com/vitejs/vite/commit/4b4291018a34d1591a6a18ab5c406d5b6a7a4ea1
- https://github.com/vitejs/vite/commit/517affb174632db347a6a2426f12eab020277946
- https://github.com/vitejs/vite/commit/8ef8a1b27bcd0e8e7693569f98b52b1b111025ca
- https://github.com/vitejs/vite/commit/e5f23b60f0c46a906a60986faad88a5bd7611a15
- https://github.com/vitejs/vite/blob/v6.4.6/packages/vite/CHANGELOG.md
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.

Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.

Entry: https://cve.now/CVE-2026-140097
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-140097"}.

Affected versions

cve.now Index

21Pof 100 · provisional · methodology v3
  • Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
  • Exposure12/25Specific setups only, reachable over the network without a login
  • Reach?/20Unknown. No tracked technology or package matched
  • Severity9.1/10CVSS 9.1
  • No patch0/5No signal

What would change the score

  • Would score about 71 if added to CISA KEV
  • Would score about 66 if CISA's SSVC rates exploitation active

Timeline

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now

Evidence 15

Questions about CVE-2026-140097

Is CVE-2026-140097 being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.

Source: cve.now feed data

What does this mean?

The dev server can be made to read files outside its allow list and to evaluate injected code, which gives arbitrary code execution in the dev server process.

Source: github.com

Which versions are affected by CVE-2026-140097?

vite: from 4.0.0 before 6.4.6; from 7.0.0 before 7.3.8; from 8.0.0 before 8.1.7; from 8.2.0 before 8.2.5; from 8.3.0 before 8.3.7. vite-plus: before 1.5.1.

Source: cve.now feed data

Am I affected, and how do I check?

Vite 4.0.0 up to 6.4.6, 7.0.0 up to 7.3.8, 8.0.0 up to 8.1.7, 8.2.0 up to 8.2.5, and 8.3.0 up to 8.3.7, plus vite-plus before 1.5.1. The issue applies to dev servers explicitly exposed to the network with --host or server.host. Check the installed Vite version and whether either option is set.

Source: github.com

How do I fix CVE-2026-140097?

Upgrade to Vite 6.4.6, 7.3.8, 8.1.7, 8.2.5, or 8.3.7 on the matching release line, or to vite-plus 1.5.1.

Source: github.com

No corrections so far. Something wrong on this page? Report an error.