CVE-2023-34092 Vite Server Options (server.fs.deny) can be bypassed using double forward-slash (//)
Attackers can bypass file access restrictions to read sensitive files from the project root if the Vite dev server is exposed to the network.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-34092?
CVE-2023-34092 is a high-severity path traversal vulnerability in vitejs vite, published on 1 Jun 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Vite 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 [email protected], [email protected], [email protected], [email protected], [email protected], and [email protected].
Which versions are affected by CVE-2023-34092?
12 open source packages ship an affected version, including vite. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vite npm | All versions | 2.9.16 |
vite npm | All versions | 2.9.16 |
vite npm | From 3.0.2 | 3.2.7 |
vite npm | From 3.0.2 | 3.2.7 |
vite npm | From 4.0.0 | 4.0.5 |
vite npm | From 4.0.0 | 4.0.5 |
6 more packages
vite npm | From 4.1.0 | 4.1.5 |
vite npm | From 4.1.0 | 4.1.5 |
vite npm | From 4.2.0 | 4.2.3 |
vite npm | From 4.2.0 | 4.2.3 |
vite npm | From 4.3.0 | 4.3.9 |
vite npm | From 4.3.0 | 4.3.9 |
Products include Vitejs Vite.
How do I fix CVE-2023-34092?
Upgrade vite to a fixed version for your release line: 2.9.16, 3.2.7, 4.0.5 or 4.1.5.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2023-34092 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-34092 exists.
Public exploit code: 1 Nuclei template.
Other vulnerabilities in vitejs vite
- CVE-2025-31125 Vite Vitejs Improper Access Control
- CVE-2026-53571 Vite: `server.fs.deny` bypass on Windows alternate paths
- CVE-2026-39363 Vite Affected by Arbitrary File Read via Vite Dev Server WebSocket
- CVE-2026-39364 Vite has a `server.fs.deny` bypass with queries
- CVE-2024-23331 Vite dev server option `server.fs.deny` can be bypassed when hosted on case-insensitive filesystem
Sources
Also known as GHSA-353f-5xf4-qw67.