{ "canonical_id": "vite--CVE-2025-62522", "system_id": "vite", "display_name": "Vite", "category": "frameworks", "advisory_mode": "core", "title": "vite allows server.fs.deny bypass via backslash on Windows", "summary": "### 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\"image\"", "published_at": "2025-10-20T19:54:28Z", "updated_at": "2026-02-04T04:13:38.886554Z", "severity": "medium", "cvss_score": 4.0, "exploit_status": "unknown", "source_confidence": "official", "official_source_url": "https://github.com/vitejs/vite/security/advisories/GHSA-93m4-6634-74q7", "secondary_source_urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2025-62522", "https://github.com/vitejs/vite/commit/f479cc57c425ed41ceb434fecebd63931b1ed4ed", "https://github.com/vitejs/vite" ], "aliases": [ "CVE-2025-62522", "GHSA-93m4-6634-74q7" ], "cve_ids": [ "CVE-2025-62522" ], "ghsa_ids": [ "GHSA-93m4-6634-74q7" ], "osv_ids": [ "GHSA-93m4-6634-74q7" ], "affected_versions": [ "introduced=7.1.0, fixed<7.1.11", "introduced=7.0.0, fixed<7.0.8", "introduced=6.0.0, fixed<6.4.1", "introduced=2.9.18, fixed<5.4.21", "introduced=3.2.9, fixed<5.4.21", "introduced=4.5.3, fixed<5.4.21", "introduced=5.2.6, fixed<5.4.21" ], "fixed_versions": [ "7.1.11", "7.0.8", "6.4.1", "5.4.21" ], "package_name": "vite", "render_markdown": true, "case_path": "07-framework-security/frameworks/vite/cases/vite-cve-2025-62522.md", "secure_code_topics": [ "dependency-upgrade-policy", "file-upload-validation", "proxy-trust-boundary" ], "status": "generated", "triage_reasons": [], "metadata": { "source_names": [ "OSV Vite" ], "source_kinds": [ "osv-batch" ], "candidate_count": 1 } }