CVE-2026-144956 — SpectoLabs Hoverfly (1.12.17) — CWE-295
Hoverfly before 1.12.17 contains an improper certificate validation vulnerability in GetHttpClient in core/http.go that disables upstream TLS verification when -client-authentication-ca-cert is unset. Network attackers intercepting traffic can impersonate upstream hosts with arbitrary certificates to read client-certificate-authenticated requests and return forged responses recorded into simulations.
Hoverfly before 1.12.17 contains an improper certificate validation vulnerability in GetHttpClient in core/http.go that disables upstream TLS verification when -client-authentication-ca-cert is unset. Network attackers intercepting traffic can impersonate upstream hosts with arbitrary certificates to read client-certificate-authenticated requests and return forged responses recorded into simulations.
🎯 What is this vulnerability?
CVE-2026-144956 is a critical Improper Certificate Validation vulnerability (CWE-295) in SpectoLabs Hoverfly (a dynamic API mocking and service virtualization tool).
Technical Flaw Analysis
The vulnerability resides in theGetHttpClient function within core/http.go. Hoverfly is designed to intercept HTTP/HTTPS traffic and route it to upstream servers or return mocked responses. When configured to proxy traffic to upstream services, it establishes TLS connections to those upstream hosts.The core logic error is a conditional bypass of TLS verification:
1. Hoverfly checks if the -client-authentication-ca-cert flag is set.
2. If this flag is unset (which is the default state for many deployments that do not require mutual TLS for the client side of the proxy), the code explicitly disables TLS verification for the upstream connection.
3. This means that even if the upstream server presents a self-signed, expired, or completely invalid certificate, Hoverfly will accept the connection without validating the certificate chain against any trusted CA.
Why this is critical:
In a standard proxy setup, the proxy (Hoverfly) acts as the client to the upstream server. If TLS verification is disabled, an attacker positioned between Hoverfly and the upstream server (Man-in-the-Middle) can present any certificate (e.g., CN=upstream-api.internal) and Hoverfly will trust it. This allows the attacker to:
1. Decrypt the traffic between Hoverfly and the upstream server (if the traffic is encrypted with a key the attacker can derive or if the attacker is the one terminating the TLS).
2. Forge responses from the upstream server, which Hoverfly will then record into its simulation database or pass back to the original client.
Note: The CVSS vector AT:P (Attack Target: Privileged) suggests that while the network vector is unauthenticated, the attacker must be able to intercept traffic destined for the upstream server, implying a network position (e.g., same subnet, compromised switch, or ARP spoofing) rather than a pure remote internet attack against the Hoverfly UI itself.
⚡ Attack Chain
1. Discovery & Reconnaissance
- Service Identification: The attacker identifies a Hoverfly instance running on the network (default port
8888for API,8889for proxy). - Version Check: The attacker queries the Hoverfly API endpoint
/api/v1/infoor checks theUser-Agent/Serverheaders to confirm the version is< 1.12.17. - Configuration Audit: The attacker determines that Hoverfly is configured to proxy traffic to sensitive upstream services (e.g., internal payment APIs, database proxies) and that
-client-authentication-ca-certis not set in the startup arguments. This can often be inferred if Hoverfly is successfully proxying HTTPS traffic to upstreams without explicit CA bundle configuration for upstream verification. - Attacker is on the same network segment as Hoverfly and the upstream server.
- Attacker can perform ARP spoofing or has a compromised network switch.
- Attacker generates a self-signed certificate for the upstream host (e.g.,
upstream-api.corp.local).
2. Exploitation
The attacker performs a Man-in-the-Middle (MitM) attack on the network path between Hoverfly and the upstream server.Prerequisites:
Step-by-Step Exploitation:
1. Traffic Interception:
The attacker uses a tool like ettercap or mitmproxy to intercept traffic between Hoverfly (IP: 10.0.0.5) and the upstream server (IP: 10.0.0.10).
2. Certificate Forgery:
The attacker presents a self-signed certificate for upstream-api.corp.local to Hoverfly.
3. Bypassing Validation:
Because -client-authentication-ca-cert is unset, Hoverfly's GetHttpClient function skips the InsecureSkipVerify check (or explicitly sets it to true in the tls.Config). The TLS handshake succeeds.
4. Response Forgery:
The attacker modifies the response from the upstream server. For example, if the upstream returns {"status": "ok"}, the attacker changes it to {"status": "failed", "error": "auth_token_invalid"} or injects malicious data.
Illustrative PoC (Conceptual):
# Attacker setup using mitmproxy
# 1. Generate self-signed cert for upstream
openssl req -x509 -newkey rsa:2048 -keyout upstream.key -out upstream.crt -days 365 -nodes -subj "/CN=upstream-api.corp.local"
# 2. Start mitmproxy with the forged cert
mitmproxy --mode transparent --ssl-insecure --ssl-dh-param 2048 --cert upstream.crt --key upstream.key
# 3. Configure ARP spoofing to redirect Hoverfly's traffic to attacker
arpspoof -i eth0 -t 10.0.0.5 10.0.0.10
# 4. In mitmproxy, modify the response body
# Original: {"data": "sensitive_info"}
# Modified: {"data": "attacker_controlled_data"}Note: The exact API endpoints for Hoverfly configuration are not specified in the CVE description, so the above is an illustrative example of the network-level exploitation mechanics.
3. Post-Exploitation
🌍 Real World Impact
Based on the CVSS 4.0 vector CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N:
Practical Consequences:
🛡️ Remediation & Mitigation
1. Upgrade (Primary Fix)
# Example: Using Docker
docker pull spectolabs/hoverfly:1.12.17
docker run -d --name hoverfly -p 8888:8888 -p 8889:8889 spectolabs/hoverfly:1.12.172. Workarounds (If Upgrade is Not Immediately Possible)
-client-authentication-ca-cert: Even if mutual TLS is not required, setting this flag to a valid CA bundle (e.g., the system CA store) will force Hoverfly to validate upstream certificates.hoverfly -client-authentication-ca-cert /etc/ssl/certs/ca-certificates.crt3. Detection
Zeek or `Suricata* to detect:
* TLS handshakes with self-signed or invalid certificates from Hoverfly to upstream servers.
* Unexpected changes in response bodies (e.g., size mismatches, content hash changes).
⚠️ Urgency
While the exploit complexity is high (requiring a network-level MitM position), the impact is severe (data exfiltration and integrity compromise). In environments where Hoverfly is used in CI/CD pipelines or handles sensitive data, this vulnerability should be treated as critical and patched immediately. Organizations should prioritize upgrading to 1.12.17 within 24-48 hours, especially if Hoverfly is deployed in network segments with potential for internal lateral movement or MitM attacks.
[🤖 CVE Professor AI Security Engine]
FOFA Query