用于 CVE-2025-34299 的 Docker 测试环境 —— Monsta FTP 预认证远程代码执行漏洞。
| 字段 | 值 |
|---|---|
| CVE 编号 | CVE-2025-34299 |
| 严重性 | 严重(CVSS 9.8) |
| CWE | CWE-434(危险类型文件的不受限制上传) |
| 受影响版本 | <= 2.11.2 |
| 已修复版本 | 2.11.3 |
| KEV | 是 |
Monsta FTP 版本 <= 2.11.2 存在一个通过不受限制的任意文件上传实现的预认证远程代码执行漏洞。downloadFile API 端点(/mftp/application/api/api.php)在接受用户控制的文件路径时未进行适当的清理,从而允许攻击者:
actionName: downloadFile 的 POST 请求# Clone this repository
git clone https://github.com/KrE80r/CVE-2025-34299-lab.git
cd CVE-2025-34299-lab
# Start the vulnerable environment
docker-compose up -d
# Verify it's running
curl -s http://localhost:8080/mftp/ | grep -o "MonstaFTP"
# Test with nuclei template
nuclei -t CVE-2025-34299.yaml -u http://localhost:8080
# Expected output:
# [CVE-2025-34299] [http] [critical] http://localhost:8080/mftp/application/api/api.php ["2.10.4"]
# Check if the vulnerable API endpoint is accessible
curl -X POST http://localhost:8080/mftp/application/api/api.php \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'request={"connectionType":"ftp","configuration":{"host":"127.0.0.1","username":"test","initialDirectory":"/","password":"test","port":21},"actionName":"downloadFile","context":{"remotePath":"/test.txt","localPath":"/tmp/test.txt"}}'
# Expected response contains "CONNECTION_FAILURE_ERROR" proving the vulnerable code path is reached
# Stop and remove the container
docker-compose down
# Remove the image
docker rmi cve-2025-34299-lab-monsta-ftp-vulnerable
本环境仅供安全研究与测试目的使用。请勿将其用于您不拥有或未经明确许可进行测试的系统。
MIT 许可证