Summary
Vite's server.fs.deny bypassed with /. for files under project root
The contents of files in the project root that are denied by a file matching pattern can be returned to the browser.
Details
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 (/.).
PoC
npm create vite@latest
cd vite-project/
cat "secret" > .env
npm install
npm run dev
curl --request-target /.env/. http://localhost:5173
Impact
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.
- Examples of file matching patterns:
.env,.env.*,*.{crt,pem},**/.env - Examples of other patterns:
**/.git/**,.git/**,.git/**/*
Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
vite to 6.3.4 or later; vite to 6.2.7 or later; vite to 6.1.6 or later; vite to 5.4.19 or later; vite to 4.5.14 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is CVE-2025-46565? CVE-2025-46565 is a medium-severity path traversal vulnerability in vite (npm), affecting versions >= 6.3.0, <= 6.3.3. It is fixed in 6.3.4, 6.2.7, 6.1.6, 5.4.19, 4.5.14. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
- Which versions of vite are affected by CVE-2025-46565? vite (npm) versions >= 6.3.0, <= 6.3.3 is affected.
- Is there a fix for CVE-2025-46565? Yes. CVE-2025-46565 is fixed in 6.3.4, 6.2.7, 6.1.6, 5.4.19, 4.5.14. Upgrade to this version or later.
- Is CVE-2025-46565 exploitable, and should I be worried? Whether CVE-2025-46565 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2025-46565 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2025-46565?
- Upgrade
viteto 6.3.4 or later - Upgrade
viteto 6.2.7 or later - Upgrade
viteto 6.1.6 or later - Upgrade
viteto 5.4.19 or later - Upgrade
viteto 4.5.14 or later
- Upgrade