CVE-2025-30208 Vite bypasses server.fs.deny when using `?raw??`
Attackers can read arbitrary files by bypassing server.fs.deny restrictions in Vite dev servers 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-30208?
CVE-2025-30208 is a medium-severity path traversal vulnerability in vitejs vite, published on 24 Mar 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, a provider of frontend development tooling, has a vulnerability in versions prior to 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10. `@fs` denies access to files outside of Vite serving allow list. Adding `?raw??` or `?import&raw??` to the URL bypasses this limitation and returns the file content if it exists. This bypass exists because trailing separators such as `?` are removed in several places, but are not accounted for in query string regexes. The contents of arbitrary files can be returned to the browser. Only apps explicitly exposing the Vite dev server to the network (using `--host` or `server.host` config option) are affected. Versions 6.2.3, 6.1.2, 6.0.12, 5.4.15, and 4.5.10 fix the issue.
Which versions are affected by CVE-2025-30208?
10 open source packages ship an affected version, including vite. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vite npm | All versions | 4.5.10 |
vite npm | All versions | 4.5.10 |
vite npm | From 5.0.0 | 5.4.15 |
vite npm | From 5.0.0 | 5.4.15 |
vite npm | From 6.0.0 | 6.0.12 |
vite npm | From 6.0.0 | 6.0.12 |
4 more packages
vite npm | From 6.1.0 | 6.1.2 |
vite npm | From 6.1.0 | 6.1.2 |
vite npm | From 6.2.0 | 6.2.3 |
vite npm | From 6.2.0 | 6.2.3 |
Products include Vitejs Vite.
How do I fix CVE-2025-30208?
Upgrade vite to a fixed version for your release line: 4.5.10, 5.4.15, 6.0.12 or 6.1.2.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-30208 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-30208 exists.
Public exploit code: 1 Exploit-DB entry, 1 Nuclei template and 25 proofs of concept on GitHub.
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-x574-m823-4x7w, MINI-8g8g-g9xj-8mm9, ROOT-APP-NPM-CVE-2025-30208.