Skip to main content

Exposure of Sensitive Information to an Unauthorized Actor in org.webjars.npm:vite

CVE-2025-32395

  • org.webjars.npm:vite
  • org.webjars.npm:vitejs__plugin-legacy
  • vite
Severity Medium
Score 6/10

Summary

Vite is a frontend tooling framework for JavaScript. The contents of arbitrary files can be returned to the browser if the dev server is running on Node or Bun. HTTP 1.1 spec (RFC 9112) does not allow "#" in "request-target". However, an attacker can send such a request. For those requests with an invalid "request-line" (it includes "request-target"), the spec recommends rejecting them with 400 or 301. The same can be said for HTTP 2. On Node and Bun, those requests are not rejected internally and are 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. Only apps explicitly exposing the Vite dev server to the network (using "--host" or "server.host" config option) and running the Vite dev server on runtimes that are not Deno (e.g. Node, Bun) are affected. This issue affects vite versions through 4.5.12, 5.0.0-beta.0 through 5.4.17, 6.0.0-alpha.0 through 6.0.14, 6.1.0-beta.0 through 6.1.4, 6.2.0-beta.0 through 6.2.5, 6.3.0-beta.0 and 6.3.0-beta.1.

  • LOW
  • NETWORK
  • PASSIVE
  • NONE

CWE-200 - Information Exposure

An information exposure vulnerability is categorized as an information flow (IF) weakness, which can potentially allow unauthorized access to otherwise classified information in the application, such as confidential personal information (demographics, financials, health records, etc.), business secrets, and the application's internal environment.

Advisory Timeline

  • Published