CVE-2025-58752 Vite's `server.fs` settings were not applied to HTML files
Attackers can read arbitrary HTML files from the local machine via the Vite dev or preview server if exposed to the network.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2025-58752?
CVE-2025-58752 is a low-severity path traversal vulnerability in vitejs vite, published on 8 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Vite is a frontend tooling framework for JavaScript. Prior to versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20, any HTML files on the machine were served regardless of the `server.fs` settings. Only apps that explicitly expose the Vite dev server to the network (using --host or server.host config option) and use `appType: 'spa'` (default) or `appType: 'mpa'` are affected. This vulnerability also affects the preview server. The preview server allowed HTML files not under the output directory to be served. Versions 7.1.5, 7.0.7, 6.3.6, and 5.4.20 fix the issue.
Which versions are affected by CVE-2025-58752?
8 open source packages ship an affected version, including vite. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vite npm | All versions | 5.4.20 |
vite npm | All versions | 5.4.20 |
vite npm | From 6.0.0 | 6.3.6 |
vite npm | From 6.0.0 | 6.3.6 |
vite npm | From 7.0.0 | 7.0.7 |
vite npm | From 7.0.0 | 7.0.7 |
2 more packages
vite npm | From 7.1.0 | 7.1.5 |
vite npm | From 7.1.0 | 7.1.5 |
Products include Vitejs Vite.
How do I fix CVE-2025-58752?
Upgrade vite to a fixed version for your release line: 5.4.20, 6.3.6, 7.0.7 or 7.1.5.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-58752 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-58752 exists.
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-jqfw-vq24-v9c3, MINI-59c9-2qv7-hgc3, MINI-7fwg-fxrc-v3qh, MINI-cw62-rmhf-xrgj, ROOT-APP-NPM-CVE-2025-58752.