CVE-2025–54123 Hoverfly ≤1.11.3 Command Injection (RCE) Case
Hoverfly's middleware management API accepted a user-supplied binary and script and passed them directly to exec.Command, allowing an authenticated attacker to run arbitrary OS commands. The command output was returned in error messages, so code execution could be confirmed even when the request failed.
Published on medium.com
This Case Study focuses on CVE-2025–54123, a critical Remote Code Execution vulnerability discovered in Hoverfly, an open-source API simulation and service virtualization tool widely used in CI/CD pipelines and development environments. The CVSS score is 9.8 CRITICAL (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), and it…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
The middleware API passed the user-controlled binary and script values directly to exec.Command without validation or allowlisting.
Impact
An authenticated attacker could execute arbitrary OS commands on the host with the privileges of the Hoverfly process, and command output was leaked in error responses.
What the attacker needed
Authenticated access to the admin API
The fix
The PUT endpoint was disabled by default and a flag was added to enable it; the report notes that proper input validation and binary allowlisting are the real fix.
How it was found
- Log in to the Hoverfly admin interface.
- Send a PUT request to the middleware endpoint with a JSON body containing a binary and script.
- Observe the command output in the error response after STDOUT.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Hoverfly is a tool that lets developers simulate APIs. It has an admin interface that can be told to run a helper program (middleware) to modify traffic. The bug is that it took the name of that program from the user and ran it without checking, so someone who could log in could make the server run any command they wanted.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.