# Vite 在使用 `?raw??` 时绕过 server.fs.deny 配置
## 漏洞描述
### 概述
Vite是一款前端开发工具,在某些旧版本中存在一个漏洞,允许攻击者绕过文件访问限制并读取任意文件。
### 影响版本
- 版本早于6.2.3, 6.1.2, 6.0.12, 5.4.15 和 4.5.10。
### 细节
在这些受影响的版本中,通过`@fs`接口可以访问Vite服务允许列表中的文件。但是添加特殊参数(如`?raw??`或`?import&raw??`)到URL时,会绕过这些限制,返回任意存在的文件内容。这是因为处理URL附加参数时删除了尾随分隔符(`?`),但没有考虑查询字符串的正则表达式。
### 影响
- 只有使用 `--host` 或配置选项 `server.host` 显式暴露Vite开发服务器到网络的应用受此漏洞影响。
- 修复版本:6.2.3, 6.1.2, 6.0.12, 5.4.15 和 4.5.10。
# | POC 描述 | 源链接 | 神龙链接 |
---|---|---|---|
1 | 最新的CVE-2025-30208的poc(这个仓库主要拿来写实战src的一些自己写的bypass-waf的脚本以及搜集的干货博主) | https://github.com/LiChaser/CVE-2025-30208 | POC详情 |
2 | 全网首发 The first Vite scanner on the entire network Automatic target asset collection via FOFA Multi-threaded concurrent scanning Automatic CSV report generation | https://github.com/xuemian168/CVE-2025-30208 | POC详情 |
3 | CVE-2025-30208-EXP | https://github.com/ThumpBo/CVE-2025-30208-EXP | POC详情 |
4 | CVE-2025-30208 检测工具。python script && nuclei template | https://github.com/xaitx/CVE-2025-30208 | POC详情 |
5 | CVE-2025-30208漏洞验证工具 | https://github.com/kk12-30/CVE-2025-30208 | POC详情 |
6 | CVE-2025-30208 任意文件读取漏洞快速验证 | https://github.com/YuanBenSir/CVE-2025-30208_POC | POC详情 |
7 | CVE-2025-30208-EXP 任意文件读取 | https://github.com/marino-admin/Vite-CVE-2025-30208-Scanner | POC详情 |
8 | CVE-2025-30208动态检测脚本,支持默认路径,自定义路径动态检测 | https://github.com/iSee857/CVE-2025-30208-PoC | POC详情 |
9 | 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 for misuse or damage caused by this exploit. | https://github.com/On1onss/CVE-2025-30208-LFI | POC详情 |
10 | CVE-2025-30208 | Vite脚本 | https://github.com/sadhfdw129/CVE-2025-30208-Vite | POC详情 |
11 | CVE-2025-30208 ViteVulnScanner | https://github.com/keklick1337/CVE-2025-30208-ViteVulnScanner | POC详情 |
12 | A PoC of the exploit script for the Arbitrary File Read vulnerability of Vite /@fs/ Path Traversal in the transformMiddleware (CVE-2025-30208). | https://github.com/4xura/CVE-2025-30208 | POC详情 |
13 | 针对CVE-2025-30208和CVE-2025-31125的漏洞利用 | https://github.com/jackieya/ViteVulScan | POC详情 |
14 | None | https://github.com/0xshaheen/CVE-2025-30208 | POC详情 |
15 | mass scan for CVE-2025-30208 | https://github.com/sumeet-darekar/CVE-2025-30208 | POC详情 |
16 | CVE-2025-30208 - Vite Arbitrary File Read PoC | https://github.com/4m3rr0r/CVE-2025-30208-PoC | POC详情 |
17 | Vite-CVE-2025-30208-EXP单目标检测,支持自定义读取路径,深度检索 | https://github.com/lilil3333/Vite-CVE-2025-30208-EXP | POC详情 |
18 | 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. | https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2025/CVE-2025-30208.yaml | POC详情 |
19 | None | https://github.com/Threekiii/Awesome-POC/blob/master/%E5%BC%80%E5%8F%91%E6%A1%86%E6%9E%B6%E6%BC%8F%E6%B4%9E/Vite%20%E5%BC%80%E5%8F%91%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%BB%BB%E6%84%8F%E6%96%87%E4%BB%B6%E8%AF%BB%E5%8F%96%E6%BC%8F%E6%B4%9E%E7%BB%95%E8%BF%87%20CVE-2025-30208.md | POC详情 |
20 | https://github.com/vulhub/vulhub/blob/master/vite/CVE-2025-30208/README.md | POC详情 |
标题: server.fs.deny bypassed when using `?raw??` · Advisory · vitejs/vite · GitHub -- 🔗来源链接
标签: x_refsource_CONFIRM
标题: fix: backport #19702, fs raw query with query separators (#19704) · vitejs/vite@315695e · GitHub -- 🔗来源链接
标签: x_refsource_MISC
标题: fix: fs raw query with query separators (#19702) · vitejs/vite@80381c3 · GitHub -- 🔗来源链接
标签: x_refsource_MISC
标题: fix: backport #19702, fs raw query with query separators (#19703) · vitejs/vite@807d7f0 · GitHub -- 🔗来源链接
标签: x_refsource_MISC
标题: fix: fs raw query with query separators (#19702) · vitejs/vite@92ca12d · GitHub -- 🔗来源链接
标签: x_refsource_MISC
标题: fix: fs raw query with query separators (#19702) · vitejs/vite@f234b57 · GitHub -- 🔗来源链接
标签: x_refsource_MISC