CVE-2025-32395

CVE-2025-32395 is a medium-severity security vulnerability in vite (npm), affecting versions >= 6.2.0, < 6.2.6. It is fixed in 6.2.6, 6.1.5, 6.0.15, 5.4.18, 4.5.13.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Vite has an server.fs.deny bypass with an invalid request-target

The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun.

Details

HTTP 1.1 spec (RFC 9112) does not allow # in request-target. Although an attacker can send such a request. For those requests with an invalid request-line (it includes request-target), the spec recommends to reject them with 400 or 301. The same can be said for HTTP 2 (ref1, ref2, ref3).

On Node and Bun, those requests are not rejected internally and is passed to the user land. For those requests, the value of http.IncomingMessage.url contains #. Vite assumed req.url won't contain # when checking server.fs.deny, allowing those kinds of requests to bypass the check.

On Deno, those requests are not rejected internally and is passed to the user land as well. But for those requests, the value of http.IncomingMessage.url did not contain #.

PoC

npm create vite@latest
cd vite-project/
npm install
npm run dev

send request to read /etc/passwd

curl --request-target /@fs/Users/doggy/Desktop/vite-project/#/../../../../../etc/passwd http://127.0.0.1:5173

Impact

Only apps with the following conditions are affected.

  • explicitly exposing the Vite dev server to the network (using --host or server.host config option)
  • running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun)

Affected versions

vite (>= 6.2.0, < 6.2.6) vite (>= 6.1.0, < 6.1.5) vite (>= 6.0.0, < 6.0.15) vite (>= 5.0.0, < 5.4.18) vite (< 4.5.13)

Security releases

vite → 6.2.6 (npm) vite → 6.1.5 (npm) vite → 6.0.15 (npm) vite → 5.4.18 (npm) vite → 4.5.13 (npm)

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

Upgrade the following packages to resolve this vulnerability:

vite to 6.2.6 or later; vite to 6.1.5 or later; vite to 6.0.15 or later; vite to 5.4.18 or later; vite to 4.5.13 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-32395? CVE-2025-32395 is a medium-severity security vulnerability in vite (npm), affecting versions >= 6.2.0, < 6.2.6. It is fixed in 6.2.6, 6.1.5, 6.0.15, 5.4.18, 4.5.13.
  2. Which versions of vite are affected by CVE-2025-32395? vite (npm) versions >= 6.2.0, < 6.2.6 is affected.
  3. Is there a fix for CVE-2025-32395? Yes. CVE-2025-32395 is fixed in 6.2.6, 6.1.5, 6.0.15, 5.4.18, 4.5.13. Upgrade to this version or later.
  4. Is CVE-2025-32395 exploitable, and should I be worried? Whether CVE-2025-32395 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
  5. What actually determines whether CVE-2025-32395 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.
  6. How do I fix CVE-2025-32395?
    • Upgrade vite to 6.2.6 or later
    • Upgrade vite to 6.1.5 or later
    • Upgrade vite to 6.0.15 or later
    • Upgrade vite to 5.4.18 or later
    • Upgrade vite to 4.5.13 or later

Other vulnerabilities in vite

Stop the waste.
Protect your environment with Kodem.