Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
vitejs vite
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| vite npm |
|
|
vitejs vite
| Product | Affected | Fixed in |
|---|---|---|
| vite npm |
|
|
4.1.54.2.34.3.9Vite provides frontend tooling. Prior to versions 2.9.16, 3.2.7, 4.0.5, 4.1.5, 4.2.3, and 4.3.9, Vite Server Options (`server.fs.deny`) can be bypassed using double forward-slash (//) allows any unauthenticated user to read file from the Vite root-path of the application including the default `fs.deny` settings (`['.env', '.env.*', '*.{crt,pem}']`). Only users explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected, and only files in the immediate Vite project root folder could be exposed. This issue is fixed in vite@4.3.9, vite@4.2.3, vite@4.1.5, vite@4.0.5, vite@3.2.7, and vite@2.9.16.
From the CVE record · GitHub_M
A double forward-slash can bypass the Vite dev server's `server.fs.deny` setting, allowing an unauthenticated user to read files in the immediate project root, including files covered by the default deny rules. This affects only dev servers explicitly exposed to the network using `--host` or `server.host`; no user interaction is required.
Anyone running the npm `vite` package should check for versions below 2.9.16, 3.0.2–3.2.6, 4.0.0–4.0.4, 4.1.0–4.1.4, 4.2.0–4.2.2, or 4.3.0–4.3.8.