{"schema":"threatline.record/2","record":{"id":"CVE-2026-112947","aliases":["GHSA-vfpm-58rq-9qcg"],"summary":"Vite: First 4 bytes of files outside of `server.fs` setting is exposed by `?vite-wasm-instance`","details":"### Summary\n\nThe first 4 bytes of files outside of `server.fs` setting can be returned to the browser by a request containing `?vite-wasm-instance`.\n\n### Impact\n\n Only apps that match one of the following conditions are affected:\n\n- explicitly expose the Vite dev server to the network using `--host` or the [`server.host`](https://vite.dev/config/server-options#server-host) option\n- there's a file that has a sensitive information in **the first 4 bytes**\n- uses Node.js or Deno to run Vite (if Bun is used, it is not affected)\n\n### Details\nRequests 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.\n\nAfter 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.\n\n### PoC\n\nCreate a denied file and start an affected Vite dev server:\n\n```bash\necho 'SECRET_KEY=abc123\\n' > .env\nnpm run dev\ncurl 'http://localhost:5173/.env?vite-wasm-instance'\n```\n\nThis will show\n```\nFailed to parse WASM file \"<root>/.env\": WebAssembly.compile(): expected magic word 00 61 73 6d, found 53 45 43 52 @+0\n```","categories":["Libraries & packages"],"product":"vite","vendor":"vitejs","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T16:47:16Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vite"},"range":">= 8.3.0, <= 8.3.2"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T16:47:16Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vite"},"range":">= 8.2.0, <= 8.2.3"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T16:47:16Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vite-plus"},"range":">= 0.2.8, <= 1.0.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-112947","source_modified_at":"2026-10-21T15:54:49.530Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"vite","vendor":"vitejs","versions":[{"version":">= 8.3.0, < 8.3.3","status":"affected"},{"version":">= 8.2.0, < 8.2.4","status":"affected"}],"defaultStatus":null},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-112947","source_modified_at":"2026-10-21T15:54:49.530Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"vite-plus","vendor":"vitejs","versions":[{"version":">= 0.2.8, < 1.1.0","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T17:00:07.443467820Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vite","ecosystem":"npm","purl":"pkg:npm/vite"},"ranges":[{"type":"SEMVER","events":[{"introduced":"8.3.0"},{"fixed":"8.3.3"}]}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T17:00:07.443467820Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vite","ecosystem":"npm","purl":"pkg:npm/vite"},"ranges":[{"type":"SEMVER","events":[{"introduced":"8.2.0"},{"fixed":"8.2.4"}]}],"versions":[]},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T17:00:07.443467820Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vite-plus","ecosystem":"npm","purl":"pkg:npm/vite-plus"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.2.8"},{"fixed":"1.1.0"}]}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T16:47:16Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vite"},"version":"8.3.3"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T16:47:16Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vite"},"version":"8.2.4"},{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T16:47:16Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"vite-plus"},"version":"1.1.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T17:00:07.443467820Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vite","ecosystem":"npm","purl":"pkg:npm/vite"},"version":"8.3.3"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T17:00:07.443467820Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vite","ecosystem":"npm","purl":"pkg:npm/vite"},"version":"8.2.4"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-vfpm-58rq-9qcg","source_modified_at":"2026-10-21T17:00:07.443467820Z","fetched_at":"2026-10-23T18:45:31.882637Z","package":{"name":"vite-plus","ecosystem":"npm","purl":"pkg:npm/vite-plus"},"version":"1.1.0"}],"cvss":6.3,"severity":"Medium","kev":{"listed":false},"epss":{"probability":0.00422,"percentile":0.35493,"score_date":"2026-10-23"},"published_at":"2026-10-20T15:10:51.025Z","modified_at":"2026-10-21T17:00:07.443467820Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-21T16:47:16Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-112947","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-21T15:54:49.530Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-vfpm-58rq-9qcg","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-21T17:00:07.443467820Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-112947","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/vitejs/vite/security/advisories/GHSA-vfpm-58rq-9qcg","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-112947","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/vitejs/vite/pull/23655","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/vitejs/vite/commit/b6c6d2fb3f853aab4092dc25f0d6816a96c23dff","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/vitejs/vite/commit/ba8b7ab43b4afa5d0292ab4b6e3a7b5033cc9c73","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-vfpm-58rq-9qcg","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial","assessed_at":"2026-10-21T14:24:23.584105Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-21T17:00:07.443467820Z","content_hash":"ba84340821bfa0682070a8d1a75a63ae1862879eee4d7668a7c8fbbd9ccf77a5"}}
