CVE-2025-54123
Hoverfly vulnerable to remote code execution at `/api/v2/hoverfly/middleware` endpoint due to insecure middleware implementation
Check your servers for CVE-2025-54123
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-54123 affects hoverfly, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 10.9%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 95.9% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 10 Sep 2025):
- Exploitation
- poc: a proof of concept is public
- Automatable
- yes: an attacker can automate the attack across many targets
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-20 Improper Input Validation
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| hoverfly |
affected <= 1.11.3
|
Is my server affected?
Find the installed version of hoverfly and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i hoverfly
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-54123 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-54123RHEL, Rocky, Alma, Fedora
rpm -q hoverfly
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-54123Alpine
apk list --installed | grep -i hoverflyWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-54123
trivy image --scanners vuln IMAGE | grep CVE-2025-54123
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Exploits and proof of concept
- https://github.com/SpectoLabs/hoverfly/security/advisories/GHSA-r4h8-hfp2-ggmf github.com · exploit
Other references
- https://github.com/SpectoLabs/hoverfly/commit/17e60a9bc78826deb4b782dca1c1abd3dbe60d40 github.com
- https://github.com/SpectoLabs/hoverfly/commit/a9d4da7bd7269651f54542ab790d0c613d568d3e github.com
- https://github.com/SpectoLabs/hoverfly/blob/master/core/hoverfly_service.go#L173 github.com
- https://github.com/SpectoLabs/hoverfly/blob/master/core/middleware/local_middleware.go#L13 github.com
- https://github.com/SpectoLabs/hoverfly/blob/master/core/middleware/middleware.go#L93 github.com
Source: the record CVE-2025-54123 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse