CVE-2026-39364 是 Vite 开发服务器中的文件泄露漏洞。攻击者可以绕过 server.fs.deny 配置,从而访问并泄露敏感文件内容。此漏洞影响那些将 Vite 开发服务器暴露到网络(通过 --host 或 server.host 配置)且存在被允许目录中的敏感文件,同时又被 server.fs.deny 模式拒绝的应用。建议立即升级到 8.0.5 或更高版本以修复此问题。
该漏洞允许攻击者通过 Vite 开发服务器泄露敏感文件。攻击者需要满足以下条件:Vite 开发服务器必须暴露到网络,并且存在被 server.fs.allow 允许的敏感文件,同时该文件又被 server.fs.deny 模式拒绝。如果攻击者能够满足这些条件,他们就可以绕过安全配置,直接从服务器获取文件内容。这可能导致敏感信息泄露,例如 API 密钥、数据库凭据、源代码或其他机密数据。由于 Vite 开发服务器通常用于本地开发和测试,因此该漏洞可能不会直接影响生产环境,但如果开发环境配置不当,或者将开发服务器意外地暴露到网络,则可能造成严重的安全风险。
目前尚未公开发现利用此漏洞的公开 POC。该漏洞已于 2026 年 4 月 6 日公开披露。CISA 尚未将其添加到 KEV 目录。由于缺乏公开利用代码,当前利用概率较低,但仍需关注。
Development teams using Vite in projects where the development server is inadvertently exposed to the network are at risk. This includes developers using shared hosting environments or those who have not properly configured their Vite server settings. Projects relying on Vite for local development and testing are also vulnerable if the server is accessible from outside the development environment.
• nodejs: Monitor process arguments for --host or --port to identify exposed Vite development servers.
ps aux | grep 'node --host' || ps aux | grep 'node --port'• nodejs: Check for unusual file access patterns within the Vite project directory, particularly targeting files denied by server.fs.deny.
find . -type f -mtime -1 -print0 | xargs -0 ls -l• generic web: Monitor access logs for requests targeting files within the Vite project directory, especially those that should be denied. • generic web: Inspect response headers for unexpected content types or file extensions when accessing files within the Vite project directory.
disclosure
漏洞利用状态
EPSS
2.56% (86% 百分位)
CISA SSVC
修复此漏洞的最佳方法是升级到 Vite 8.0.5 或更高版本,该版本已修复此问题。如果无法立即升级,可以考虑以下缓解措施:首先,确保 Vite 开发服务器没有暴露到网络,避免使用 --host 或 server.host 配置。其次,仔细检查 server.fs.deny 配置,确保所有敏感文件都被正确拒绝。如果可能,尽量减少 server.fs.allow 允许的目录范围,只允许必要的目录。最后,监控 Vite 开发服务器的访问日志,及时发现并响应任何可疑活动。升级后,请确认通过访问受影响的文件路径,验证文件是否已被正确阻止。
Actualice Vite a la versión 7.3.2 o superior, o a la versión 8.0.5 o superior. Esto corrige la vulnerabilidad al evitar el acceso no autorizado a archivos bloqueados por la configuración `server.fs.deny`.
漏洞分析和关键警报直接发送到您的邮箱。
CVE-2026-39364 是 Vite 开发服务器中的一个文件泄露漏洞,攻击者可以绕过 server.fs.deny 配置,访问并泄露敏感文件内容。
如果您正在使用 Vite 开发服务器,并且将服务器暴露到网络,同时存在被允许目录中的敏感文件,并且该文件又被 server.fs.deny 模式拒绝,那么您可能受到影响。
建议立即升级到 Vite 8.0.5 或更高版本以修复此漏洞。
目前尚未公开发现利用此漏洞的公开 POC,但仍需关注。
请访问 Vite 官方网站或 GitHub 仓库,查找关于 CVE-2026-39364 的安全公告。