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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| vitejs | vite | < 4.5.10, >= 5.0.0, < 5.4.15, >= 6.0.0, < 6.0.12, >= 6.1.0, < 6.1.2, >= 6.2.0, < 6.2.3 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- Vite 6.2.2 - Arbitrary File Read EDB-52111 · remote · Apr 3, 2025
GitHub 24 repositories · most starred shown
-
ThumpBo/CVE-2025-30208-EXP ★ 194 · Mar 26, 2025
CVE-2025-30208-EXP
-
xuemian168/CVE-2025-30208 ★ 50 · Mar 26, 2025
全网首发 CVE-2025-31125 CVE-2025-30208 CVE-2025-32395 Vite Scanner
-
4xura/CVE-2025-30208 ★ 12 · Mar 27, 2025
A PoC of the exploit script for the Arbitrary File Read vulnerability of Vite /@fs/ Path Traversal in the transformMiddleware (CVE-2025-30208).
-
ThemeHackers/CVE-2025-30208 ★ 10 · Jun 27, 2025
CVE‑2025‑30208 is a medium-severity arbitrary file read vulnerability in the Vite development server (a popular frontend build tool)
-
marino-admin/Vite-CVE-2025-30208-Scanner ★ 10 · Mar 26, 2025
CVE-2025-30208-EXP 任意文件读取
-
4m3rr0r/CVE-2025-30208-PoC ★ 7 · Apr 3, 2025
CVE-2025-30208 - Vite Arbitrary File Read PoC
-
jackieya/ViteVulScan ★ 7 · Mar 31, 2025
针对CVE-2025-30208和CVE-2025-31125的漏洞利用
-
nkuty/CVE-2025-30208-31125-31486-32395 ★ 5 · May 29, 2025
-
On1onss/CVE-2025-30208 ★ 4 · Mar 27, 2025
This exploit is for educational and ethical security testing purposes only. The use of this exploit against targets without prior mutual consent is illegal, and the developer disclaims any liability …
-
r0ngy40/CVE-2025-30208-Series ★ 3 · Apr 24, 2025
Analysis of the Reproduction of CVE-2025-30208 Series Vulnerabilities
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Automated scanner template
A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.
- Vite - Arbitrary File Read http/cves/2025/CVE-2025-30208.yaml
Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | vite | >= 6.2.0, < 6.2.3 | 6.2.3 | GHSA-x574-m823-4x7w |
| npm | vite | >= 6.1.0, < 6.1.2 | 6.1.2 | GHSA-x574-m823-4x7w |
| npm | vite | >= 6.0.0, < 6.0.12 | 6.0.12 | GHSA-x574-m823-4x7w |
| npm | vite | >= 5.0.0, < 5.4.15 | 5.4.15 | GHSA-x574-m823-4x7w |
| npm | vite | < 4.5.10 | 4.5.10 | GHSA-x574-m823-4x7w |
References
- https://github.com/vitejs/vite/security/advisories/GHSA-x574-m823-4x7w
- https://github.com/vitejs/vite/commit/315695e9d97cc6cfa7e6d9e0229fb50cdae3d9f4
- https://github.com/vitejs/vite/commit/80381c38d6f068b12e6e928cd3c616bd1d64803c
- https://github.com/vitejs/vite/commit/807d7f06d33ab49c48a2a3501da3eea1906c0d41
- https://github.com/vitejs/vite/commit/92ca12dc79118bf66f2b32ff81ed09e0d0bd07ca
- https://github.com/vitejs/vite/commit/f234b5744d8b74c95535a7b82cc88ed2144263c1