Vite: First 4 bytes of files outside of `server.fs` setting is exposed by `?vite-wasm-instance` (vitejs vite)

CVE-2026-112947
MEDIUM 6.3

At a glance

Source
NVD
EPSS
EPSS 1.20 % Β· percentile 69 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
Affected products
vitejs Β· vite
vitejs Β· vite-plus
NVD status
Awaiting Analysis

Description

Vite is a frontend tooling framework for JavaScript. From 8.2.0 until 8.2.4 and 8.3.3, the first 4 bytes of files outside of server.fs setting can be returned to the browser by a request containing ?vite-wasm-instance. Requests containing the ?vite-wasm-instance query are handled by the internal Wasm plugin's load hook. The hook removes the query and reads the resulting path directly from disk, but the server.fs checks were not applied. After reading the file, Vite attempts to parse it as WebAssembly. When that parse fails, Node and deno throws an error that contains the first 4 bytes of the file. This vulnerability is fixed in 8.2.4 and 8.3.3.

Weaknesses (CWE)

  • CWE-22 β€” Improper Limitation of a Pathname to a Restricted Directory
  • CWE-200 β€” Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-209 β€” Generation of Error Message Containing Sensitive Information

References

Scores

VersionScoreVectorScored by
CVSS 4.0MEDIUM 6.3CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:NGitHub_M
CVSS 4.0MEDIUM 6.3CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XNVD Β· security-advisories@github.com (Secondary)

Advisories

European references

Affected products

ProductAffected versions
vitejs Β· vite
affected : >= 8.3.0, < 8.3.3
affected : >= 8.2.0, < 8.2.4
vitejs Β· vite-plus
affected : >= 0.2.8, < 1.1.0

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST β€” attribution requested
ENISA EUVDENISA β€” reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain β€” this product uses data from the NVD API but is not endorsed or certified by the NVD