Vite Path Traversal Vulnerability
漏洞信息
漏洞名称: Vite Path Traversal Vulnerability
漏洞编号:
- CVE: CVE-2025-31125
漏洞类型: 目录穿越
漏洞等级: 高危
漏洞描述: Vite是一个前端工具框架,专为JavaScript设计,旨在提供快速且高效的前端开发体验。它广泛应用于现代Web开发中,特别是在需要快速热重载和优化的开发环境中。Vite的开发服务器默认情况下不应该暴露给网络,但通过使用–host或server.host配置选项显式暴露的开发服务器会受到此漏洞的影响。该漏洞允许攻击者通过精心构造的URL利用Vite开发服务器的@fs端点进行路径遍历攻击,访问如/etc/passwd和/etc/hosts等敏感文件。这种漏洞的技术根源在于Vite开发服务器在处理特定请求时未能正确验证和限制文件路径,导致可以访问服务器上的任意文件。此漏洞的影响非常严重,因为它可能导致敏感信息泄露,进而可能被用于进一步的攻击。攻击者无需认证即可利用此漏洞,且可以自动化执行攻击。Vite团队已经在新版本中修复了此漏洞,建议所有用户升级到不受影响的版本。
产品厂商: Vite
产品名称: Vite
影响版本: version < 6.2.4, version < 6.1.3, version < 6.0.13, version < 5.4.16, version < 4.5.11
来源: https://github.com/harshgupptaa/Path-Transversal-CVE-2025-31125-
类型: CVE-2025:github search
仓库文件
- README.md
- exploit.py
来源概述
Vite Exploit (CVE-2025-31125)
Description: Exploits path traversal in Vite Development Server’s @fs endpoint (CVE-2025-31125) to access sensitive files like /etc/passwd and /etc/hosts via crafted URLs.
Created by Harsh Gupta.
Usage:
python vite_exploit.py -u http://target.com
python vite_exploit.py -f urls.txt -o output.txt
Requirements:
Python 3.x
pip install requests colorama
Disclaimer: This tool is for educational purposes and authorized security testing only. The author is not responsible for any misuse or damage caused by this script. Use at your own risk.
Warning: Use with permission only. Unauthorized testing is illegal.
License: MIT