CVE-2025-54123
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-09-10

Last updated on: 2025-09-17

Assigner: GitHub, Inc.

Description
Hoverfly is an open source API simulation tool. In versions 1.11.3 and prior, the middleware functionality in Hoverfly is vulnerable to command injection vulnerability at `/api/v2/hoverfly/middleware` endpoint due to insufficient validation and sanitization in user input. The vulnerability exists in the middleware management API endpoint `/api/v2/hoverfly/middleware`. This issue is born due to combination of three code level flaws: Insufficient Input Validation in middleware.go line 94-96; Unsafe Command Execution in local_middleware.go line 14-19; and Immediate Execution During Testing in hoverfly_service.go line 173. This allows an attacker to gain remote code execution (RCE) on any system running the vulnerable Hoverfly service. Since the input is directly passed to system commands without proper checks, an attacker can upload a malicious payload or directly execute arbitrary commands (including reverse shells) on the host server with the privileges of the Hoverfly process. Commit 17e60a9bc78826deb4b782dca1c1abd3dbe60d40 in version 1.12.0 disables the set middleware API by default, and subsequent changes to documentation make users aware of the security changes of exposing the set middleware API.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-09-10
Last Modified
2025-09-17
Generated
2026-05-07
AI Q&A
2025-09-10
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
hoverfly hoverfly to 1.12.0 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-20 The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2025-54123 is a critical remote code execution vulnerability in the Hoverfly API simulation tool, affecting versions 1.11.3 and earlier. The vulnerability exists in the middleware management API endpoint `/api/v2/hoverfly/middleware` due to insufficient input validation and unsafe command execution. Specifically, user input is not properly sanitized before being passed to system commands, allowing an attacker to execute arbitrary commands or upload malicious payloads on the host system with the privileges of the Hoverfly process. This can be exploited by sending crafted HTTP PUT requests to the vulnerable endpoint, leading to full remote code execution without authentication. [2]


How can this vulnerability impact me? :

This vulnerability allows an attacker to remotely execute arbitrary operating system commands on any system running the vulnerable Hoverfly service, without requiring authentication. This can lead to complete compromise of the affected system, including unauthorized access, data theft, system manipulation, and denial of service. The attacker can run commands such as spawning reverse shells, which can be used to maintain persistent access or move laterally within a network. The impact affects confidentiality, integrity, and availability of the system, making it a severe security risk. [2]


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking if the Hoverfly service is running a vulnerable version (1.11.3 or prior) and if the middleware API endpoint `/api/v2/hoverfly/middleware` is enabled and accessible. You can attempt to send a crafted HTTP PUT request to this endpoint with a JSON payload specifying a binary and script to execute, for example: `curl -X PUT http://localhost:port/api/v2/hoverfly/middleware -d '{"binary": "/bin/bash", "script": "whoami"}' -H 'Content-Type: application/json'`. If the command executes and returns output, the system is vulnerable. Additionally, monitoring network traffic for unexpected PUT requests to this endpoint or unusual command execution activity on the host can help detect exploitation attempts. [2]


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include: 1) Ensure the middleware API endpoint `/api/v2/hoverfly/middleware` is disabled by default by not enabling the `-enable-middleware-api` flag when starting Hoverfly. 2) Restrict access to the Hoverfly Admin API by binding it to localhost (127.0.0.1) only, preventing remote access. 3) Use firewalls, VPNs, or reverse proxies to limit access to trusted networks and callers. 4) Avoid exposing the Admin API publicly and enable authentication if possible. 5) Run Hoverfly only on trusted or private networks. These steps reduce the risk of unauthorized remote code execution via the vulnerable middleware API. [1, 3]


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart