{"id":"CVE-2026-112947","published":"2026-10-20T15:10:51Z","modified":"2026-10-21T15:54:49Z","title":"Vite: First 4 bytes of files outside of `server.fs` setting is exposed by `?vite-wasm-instance`","vendor":"vitejs","product":"vite","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01315,"percentile":0.70856,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-209","name":"Generation of Error Message Containing Sensitive Information"}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-vfpm-58rq-9qcg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitejs/vite/pull/23655","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/b6c6d2fb3f853aab4092dc25f0d6816a96c23dff","tags":["x_refsource_MISC"]},{"url":"https://github.com/vitejs/vite/commit/ba8b7ab43b4afa5d0292ab4b6e3a7b5033cc9c73","tags":["x_refsource_MISC"]}],"priority":{"score":23.6,"factors":[{"name":"EPSS percentile","points":14.17},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.41}]},"exploitSources":{"nuclei":[{"id":"CVE-2026-112947","name":"Vite Dev Server - server.fs Bypass via vite-wasm-instance","severity":"medium","path":"http/cves/2026/CVE-2026-112947.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-112947.yaml"}],"provenance":"source"},"vendorSlug":"vitejs","affectedVersions":[{"vendor":"vitejs","product":"vite","versions":[">= 8.3.0, < 8.3.3",">= 8.2.0, < 8.2.4"]},{"vendor":"vitejs","product":"vite-plus","versions":[">= 0.2.8, < 1.1.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-21T14:24:23.584105Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":[">=8.3.0, <8.3.3",">=8.2.0, <8.2.4"],"patched":["8.3.3","8.2.4"],"from":["GHSA-vfpm-58rq-9qcg"],"provenance":"source"},{"ecosystem":"npm","package":"vite-plus","vulnerableRanges":[">=0.2.8, <1.1.0"],"patched":["1.1.0"],"from":["GHSA-vfpm-58rq-9qcg"],"provenance":"source"}],"summary":{"text":"Vite versions from 8.2.0 through 8.2.4 and 8.3.3 contain a flaw in the internal Wasm plugin's load hook, which reads files named with the ?vite-wasm-instance query from disk without applying the server.fs restrictions. An attacker who can send network requests to the Vite dev server can exploit this without authentication or user interaction, since a request with that query returns the first 4 bytes of any file outside the server.fs allowed directories when the parse error is surfaced.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:45:42Z"},"euvd":{"id":"EUVD-2026-105135","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-vitejs-vite-cve-2022-35204","parents":[{"from":"CVE-2026-39364","to":"CVE-2026-112947","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["playground/fs-serve/root/matrixTestResultPlugin.ts"],"commits":["https://github.com/vitejs/vite/commit/b6c6d2fb3f853aab4092dc25f0d6816a96c23dff","https://github.com/vitejs/vite/commit/ba8b7ab43b4afa5d0292ab4b6e3a7b5033cc9c73","https://github.com/vitejs/vite/commit/a9a3df299378d9cbc5f069e3536a369f8188c8ff"],"basis":"rarely changed file"}]}],"children":[{"from":"CVE-2026-112947","to":"CVE-2026-118662","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["playground/fs-serve/root/matrixTestResultPlugin.ts"],"commits":["https://github.com/vitejs/vite/commit/b6c6d2fb3f853aab4092dc25f0d6816a96c23dff","https://github.com/vitejs/vite/commit/ba8b7ab43b4afa5d0292ab4b6e3a7b5033cc9c73","https://github.com/vitejs/vite/commit/91e40d7bf9777057bbd31c3eb036a54c9465697e"],"basis":"rarely changed file"}]}]}}