{"id":"CVE-2025-62522","aliases":["GHSA-93m4-6634-74q7"],"url":"https://o3.security/vulnerability/CVE-2025-62522","summary":"vite allows server.fs.deny bypass via backslash on Windows","details":"### Summary\nFiles denied by [`server.fs.deny`](https://vitejs.dev/config/server-options.html#server-fs-deny) were sent if the URL ended with `\\` when the dev server is running on Windows.\n\n### Impact\nOnly apps that match the following conditions are affected:\n\n- explicitly exposes the Vite dev server to the network (using --host or [`server.host` config option](https://vitejs.dev/config/server-options.html#server-host))\n- running the dev server on Windows\n\n### Details\n`server.fs.deny` can contain patterns matching against files (by default it includes `.env`, `.env.*`, `*.{crt,pem}` as such patterns). These patterns were able to bypass by using a back slash(`\\`). The root cause is that `fs.readFile('/foo.png/')` loads `/foo.png`.\n\n### PoC\n```shell\nnpm create vite@latest\ncd vite-project/\ncat \"secret\" > .env\nnpm install\nnpm run dev\ncurl --request-target /.env\\ http://localhost:5173\n```\n<img width=\"1593\" height=\"616\" alt=\"image\" src=\"https://github.com/user-attachments/assets/36212f4e-1d3c-4686-b16f-16b35ca9e175\" />","published":"2025-10-20T19:57:13.188Z","modified":"2026-08-12T03:51:34.730489971Z","cvss":null,"epss":{"score":0.01016,"percentile":0.60662,"asOf":"2026-08-24"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"vite","fixedVersion":"7.1.11"},{"ecosystem":"npm","name":"vite","fixedVersion":"7.0.8"},{"ecosystem":"npm","name":"vite","fixedVersion":"6.4.1"},{"ecosystem":"npm","name":"vite","fixedVersion":"5.4.21"},{"ecosystem":"npm","name":"vite","fixedVersion":"5.4.21"},{"ecosystem":"npm","name":"vite","fixedVersion":"5.4.21"},{"ecosystem":"npm","name":"vite","fixedVersion":"5.4.21"}],"fix":{"url":"https://github.com/vitejs/vite/commit/f479cc57c425ed41ceb434fecebd63931b1ed4ed","label":"vitejs/vite@f479cc5"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/62xxx/CVE-2025-62522.json"},{"type":"ADVISORY","url":"https://github.com/vitejs/vite/security/advisories/GHSA-93m4-6634-74q7"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62522"},{"type":"FIX","url":"https://github.com/vitejs/vite/commit/f479cc57c425ed41ceb434fecebd63931b1ed4ed"},{"type":"PACKAGE","url":"https://github.com/vitejs/vite"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:34.730489971Z"}}