跳到正文
GitHub 安全公告库 (GHSA)·· 1 天前精选AI 评分58

Vite 开发服务器在非 Windows 环境可返回 server.fs.allow 之外的文件

Vite: Files outside `server.fs.allow` could be served when project paths match system paths on non-Windows machine

AI 导读

GitHub 安全公告 GHSA-rq7h-c2jc-7f22 指出,Vite 开发服务器在非 Windows 机器上,当项目导入文件的根相对路径与宿主机绝对路径相同时,可把 server.fs.allow 之外的文件内容返回给浏览器,例如 /etc/hosts。

为什么值得看

公告给出了可复现的 curl 步骤,说明非 Windows 环境下 Vite 开发服务器如何把宿主机文件返回给浏览器。

来源:GitHub 安全公告库 (GHSA) · github.com