{ "canonical_id": "vite--CVE-2025-46565", "system_id": "vite", "display_name": "Vite", "category": "frameworks", "advisory_mode": "core", "title": "Vite's server.fs.deny bypassed with /. for files under project root", "summary": "### Summary\nThe contents of files in [the project `root`](https://vite.dev/config/shared-options.html#root) that are denied by a file matching pattern can be returned to the browser.\n\n### Impact\n\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.\nOnly files that are under [project `root`](https://vite.dev/config/shared-options.html#root) and are denied by a file matching pattern can be bypassed.\n\n- Examples of file matching patterns: `.env`, `.env.*`, `*.{crt,pem}`, `**/.env`\n- Examples of other patterns: `**/.git/**`, `.git/**`, `.git/**/*`\n\n### Details\n[`server.fs.deny`](https://vite.dev/config/server-options.html#server-fs-deny) can contain patterns matching against files (by default it includes `.env`, `.env.*`, `*.{crt,pem}` as such patterns).\nThese patterns were able to bypass for files under `root` by using a combination of slash and dot (`/.`).\n\n### PoC\n```\nnpm create vite@latest\ncd vite-project/\ncat \"secret\" > .env\nnpm install\nnpm run dev\ncurl --request-target /.env/. http://localhost:5173\n```\n\n![image](https://github.com/user-attachments/assets/822f4416-aa42-461f-8c95-a88d155e674b)\n![image](https://github.com/user-attachments/assets/42902144-863a-4afb-ac5b-fc16effa37cc)", "published_at": "2025-04-30T17:40:27Z", "updated_at": "2026-02-04T03:27:17.681639Z", "severity": "medium", "cvss_score": 4.0, "exploit_status": "unknown", "source_confidence": "official", "official_source_url": "https://github.com/vitejs/vite/security/advisories/GHSA-859w-5945-r5v3", "secondary_source_urls": [ "https://nvd.nist.gov/vuln/detail/CVE-2025-46565", "https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb", "https://github.com/vitejs/vite" ], "aliases": [ "CVE-2025-46565", "GHSA-859w-5945-r5v3" ], "cve_ids": [ "CVE-2025-46565" ], "ghsa_ids": [ "GHSA-859w-5945-r5v3" ], "osv_ids": [ "GHSA-859w-5945-r5v3" ], "affected_versions": [ "introduced=6.3.0, fixed<6.3.4", "introduced=6.2.0, fixed<6.2.7", "introduced=6.0.0, fixed<6.1.6", "introduced=5.0.0, fixed<5.4.19", "introduced=0, fixed<4.5.14" ], "fixed_versions": [ "6.3.4", "6.2.7", "6.1.6", "5.4.19", "4.5.14" ], "package_name": "vite", "render_markdown": true, "case_path": "07-framework-security/frameworks/vite/cases/vite-cve-2025-46565.md", "secure_code_topics": [ "dependency-upgrade-policy", "file-upload-validation", "proxy-trust-boundary" ], "status": "generated", "triage_reasons": [], "verification_status": "verified-real", "verification_mode": "real", "last_verified_at": "2026-03-18T04:05:45+00:00", "last_run_id": "vite-vite--CVE-2025-46565-20260318040538", "evidence_bundle": "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538", "historical_status": "verified-real", "latest_status": "verified-real", "browser_evidence": { "required": false, "present": true, "refs": [ "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/assets/baseline.png", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/assets/baseline-dom.html", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/logs/baseline-console.json", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/logs/baseline-network.json", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/logs/baseline-page.json", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/assets/proof.png", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/assets/proof-dom.html", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/logs/proof-console.json", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/logs/proof-network.json", "/Users/x/websafe/06-case-studies/generated-runs/vite-vite--CVE-2025-46565-20260318040538/logs/proof-page.json" ] }, "repro_profile_id": "vite-proxy-boundary", "artifact_mode": "local-fixture", "blocked_reason": null, "metadata": { "source_names": [ "OSV Vite" ], "source_kinds": [ "osv-batch" ], "candidate_count": 1 } }