{"id":"CVE-2025-46565","published":"2025-05-01T17:20:29Z","modified":"2025-05-02T17:38:55Z","title":"Vite's server.fs.deny bypassed with /. for files under project root","vendor":"vitejs","product":"vite","tier":"tail","description":{"text":"Vite is a frontend tooling framework for javascript. Prior to versions 6.3.4, 6.2.7, 6.1.6, 5.4.19, and 4.5.14, the contents of files in the project root that are denied by a file matching pattern can be returned to the browser. Only apps explicitly exposing the Vite dev server to the network (using --host or server.host config option) are affected. Only files that are under project root and are denied by a file matching pattern can be bypassed. `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 for files under `root` by using a combination of slash and dot (/.). This issue has been patched in versions 6.3.4, 6.2.7, 6.1.6, 5.4.19, and 4.5.14.","provenance":"source","from":"CVE.org"},"cvss":{"score":6,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01222,"percentile":0.68729,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/vitejs/vite/security/advisories/GHSA-859w-5945-r5v3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb","tags":["x_refsource_MISC"]}],"priority":{"score":22.9,"factors":[{"name":"EPSS percentile","points":13.75},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":4.2}]},"exploitSources":{"nuclei":[{"id":"CVE-2025-46565","name":"Vite Dev Server - Information Exposure","severity":"medium","path":"http/cves/2025/CVE-2025-46565.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-46565.yaml"}],"provenance":"source"},"vendorSlug":"vitejs","affectedVersions":[{"vendor":"vitejs","product":"vite","versions":[">= 6.3.0, < 6.3.4",">= 6.2.0, < 6.2.7",">= 6.0.0, < 6.1.6",">= 5.0.0, < 5.4.19","< 4.5.14"]}],"affected":[{"ecosystem":"npm","package":"vite","vulnerableRanges":[">=6.3.0, <6.3.4",">=6.2.0, <6.2.7",">=6.0.0, <6.1.6",">=5.0.0, <5.4.19","<4.5.14"],"patched":["6.3.4","6.2.7","6.1.6","5.4.19","4.5.14"],"from":["GHSA-859w-5945-r5v3"],"provenance":"source"}],"euvd":{"id":"EUVD-2025-12770","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-31125","published":"2025-03-31","fixed":"6.2.4","kev":true},{"cve":"CVE-2025-31486","published":"2025-04-03","fixed":"6.2.5","kev":false},{"cve":"CVE-2025-32395","published":"2025-04-10","fixed":"6.2.6","kev":false,"link":{"from":"CVE-2025-32395","to":"CVE-2025-46565","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"6.2.6","toFixed":"6.2.7","daysApart":21},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"4.5.13","toFixed":"4.5.14","daysApart":21}]}},{"cve":"CVE-2025-46565","published":"2025-05-01","fixed":"6.3.4","kev":false},{"cve":"CVE-2026-118662","published":"2026-10-28","fixed":"6.4.5","kev":false},{"cve":"CVE-2025-58751","published":"2025-09-08","fixed":"7.1.5","kev":false,"link":{"from":"CVE-2025-46565","to":"CVE-2025-58751","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"6.3.4","toFixed":"6.3.6","daysApart":130},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"5.4.19","toFixed":"5.4.20","daysApart":130}]}},{"cve":"CVE-2025-58752","published":"2025-09-08","fixed":"7.1.5","kev":false,"link":{"from":"CVE-2025-46565","to":"CVE-2025-58752","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"6.3.4","toFixed":"6.3.6","daysApart":130},{"kind":"version-step","provenance":"source","package":"npm:vite","fromFixed":"5.4.19","toFixed":"5.4.20","daysApart":130}]}}],"package":"npm:vite"}}