PoC CVE-2025-54123 - Hoverfly 中间件命令注入
此漏洞影响 Hoverfly ≤ 1.11.3 版本,专门针对 /api/v2/hoverfly/middleware 端点。其根源在于多个文件(包括 middleware.go、local_middleware.go 和 hoverfly_service.go)中输入验证和清理不充分。用户提供的 script 参数输入在未经适当检查的情况下被直接传递给系统二进制程序(例如 /bin/bash),从而允许以 Hoverfly 进程的权限实现远程命令执行(RCE)。
curlgit clone https://github.com/f4dee-backup/CVE-2025-54123
cd CVE-2025-54123
chmod +x CVE-2025-54123.sh
./CVE-2025-54123.sh -h
██████╗██╗ ██╗███████╗ ██████╗ ██████╗ ██████╗ ███████╗ ███████╗██╗ ██╗ ██╗██████╗ ██████╗
██╔════╝██║ ██║██╔════╝ ╚════██╗██╔═████╗╚════██╗██╔════╝ ██╔════╝██║ ██║███║╚════██╗╚════██╗
██║ ██║ ██║█████╗█████╗ █████╔╝██║██╔██║ █████╔╝███████╗█████╗███████╗███████║╚██║ █████╔╝ █████╔╝
██║ ╚██╗ ██╔╝██╔══╝╚════╝██╔═══╝ ████╔╝██║██╔═══╝ ╚════██║╚════╝╚════██║╚════██║ ██║██╔═══╝ ╚═══██╗
╚██████╗ ╚████╔╝ ███████╗ ███████╗╚██████╔╝███████╗███████║ ███████║ ██║ ██║███████╗██████╔╝
╚═════╝ ╚═══╝ ╚══════╝ ╚══════╝ ╚═════╝ ╚══════╝╚══════╝ ╚══════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
Hoverfly <= 1.11.3 - Authenticated Middleware Command Injection
[?] Parameters description:
-t Target base URL (e.g., http://target:8888)
-u Valid username
-p Valid password
-c Command to execute (must be enclosed in double quotes)
-h Show this help panel
[i] Example:
./CVE-2025-54123.sh -t http://target.com:8888 -u admin -p password -c "id"
此漏洞利用工具仅用于教育和授权安全测试目的。
未经明确许可,请勿针对任何系统使用此工具。未经授权的访问可能违法。
作者对滥用或造成的任何损害不承担任何责任。