{"id":"GHSA-4r4m-qw57-chr8","revision":"1b6f6b6384034f94921c15eb6332ae71","records":[{"revision":"1b6f6b6384034f94921c15eb6332ae71","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-4r4m-qw57-chr8","aliases":["CVE-2025-31125"],"title":"Vite has a `server.fs.deny` bypassed for `inline` and `raw` with `?import` query","description":"### Summary\n\nThe contents of arbitrary files can be returned to the browser.\n\n### Impact\nOnly apps explicitly exposing the Vite dev server to the network (using `--host` or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host)) are affected.\n\n### Details\n\n- base64 encoded content of non-allowed files is exposed using `?inline&import` (originally reported as `?import&?inline=1.wasm?init`)\n- content of non-allowed files is exposed using `?raw?import`\n\n`/@fs/` isn't needed to reproduce the issue for files inside the project root.\n\n### PoC\n\nOriginal report (check details above for simplified cases):\n\nThe ?import&?inline=1.wasm?init ending allows attackers to read arbitrary files and returns the file content if it exists.  Base64 decoding needs to be performed twice\n```\n$ npm create vite@latest\n$ cd vite-project/\n$ npm install\n$ npm run dev\n```\n\nExample full URL `http://localhost:5173/@fs/C:/windows/win.ini?import&?inline=1.wasm?init`","state":0,"publishedAt":"2025-03-31T17:31:54+00:00","modifiedAt":"2026-09-10T03:50:56.8584249+00:00","affected":[{"ecosystem":"npm","name":"vite","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"6.2.0"},{"kind":"fixed","version":"6.2.4"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vite","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"6.1.0"},{"kind":"fixed","version":"6.1.3"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vite","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"6.0.0"},{"kind":"fixed","version":"6.0.13"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vite","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"5.0.0"},{"kind":"fixed","version":"5.4.16"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"vite","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"4.5.11"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/vitejs/vite/security/advisories/GHSA-4r4m-qw57-chr8","https://nvd.nist.gov/vuln/detail/CVE-2025-31125","https://github.com/vitejs/vite/commit/59673137c45ac2bcfad1170d954347c1a17ab949","https://github.com/vitejs/vite","https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-31125"],"sourceUrl":"https://github.com/advisories/GHSA-4r4m-qw57-chr8","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-4r4m-qw57-chr8","identifiers":["GHSA-4r4m-qw57-chr8","CVE-2025-31125"]},"retained":false,"historicalAffected":[]}],"coverage":[]}