Skip to main content
Menu
Advisories

Configured body-file origin filter and mTLS server-verification inconsistencies

GHSA-P5C5-P2GX-H6Q6Published Updated GitHub

Description

Configured body-file origin filter and mTLS server-verification inconsistencies

Prepared for private maintainer triage on October 19, 2026. Execution results below are the saved October 16 evidence; today’s work was source, documentation and report review only. The tested version is not asserted to be the latest supported release.

Tested version: github.com/SpectoLabs/hoverfly 1.12.15. Earlier and later affected versions have not been established by this review.

Scope and limitations

These are two configuration-dependent results: simulation import exceeding a configured body-file origin restriction, and upstream certificate validation disabled in the tested mTLS configuration without a custom CA. They do not concern the documented local post-serve execution feature. Simulation-import access/admin authentication and the configured TLS options remain prerequisites.

4. bodyFile origin allowlist is a string prefix check (incomplete fix of GHSA-6xx4-x46f-f897)

core/hoverfly_funcs.go:162-172: strings.HasPrefix(fileURL, allowedOrigin) then http.DefaultClient.Get (follows redirects). Operator runs -response-body-files-allow-origin localhost:

-- CONTROL: URL outside allowed origin
{"error":"... bodyFile http://127.0.0.1:9002/secret is not allowed. ..."}
-- ATTACK: http://localhost@127.0.0.1:9002/secret (userinfo, passes HasPrefix)
... "body":"{\"secret\":\"internal-data\"}","bodyFile":"http://localhost@127.0.0.1:9002/secret" ...
attacker server saw: GET /secret Host=127.0.0.1:9002

Impact: the saved simulation-import test fetched an owned internal fixture despite a configured origin restriction. Requires simulation-import access and a non-default allowlist; authentication depends on the admin API configuration. Fix: parse and compare scheme/host/port exactly, reject userinfo, re-check redirects.

5. Client-certificate upstream connections skip server verification

core/http.go:98-103 sets InsecureSkipVerify: true when -client-authentication-ca-cert is empty, ignoring -tls-verification.

-- CONTROL: no client-auth config, default -tls-verification=true
Got error: ... tls: failed to verify certificate: x509: certificate is not valid for any names ... HTTP 502
-- ATTACK config: client cert/key set, NO ca-cert, tls-verification still true
{"secret":"internal-data"}  HTTP 200

The saved control rejects the invalid upstream certificate without client-auth configuration, while the tested client-auth configuration accepts it. On-path impersonation consequences are inferred; no third-party traffic was intercepted. Fix: use system roots when no CA file is given and honour -tls-verification.

Source review and coordination

Official docs explicitly advertise local post-serve scripts registered through the PUT API, so the leading RCE claim is not submission-ready. Separately, source and saved controls support the configured origin-filter mismatch and disabled upstream verification when client certificates omit a custom CA. Docs describe that CA as optional.

Reviewed sources:

Please assess the limited result above and consolidate it with any existing advisory if appropriate. Severity and CVE eligibility are left for triage; no separate CVE request accompanies this report. Details remain private pending coordinated disclosure.

Zachariah Mithani (zachariah@aplosai.com)

Credit: Zachariah Mithani (@zachariah-mithani, AploSec)

Affected versions

References

GitHub · SpectoLabs/hoverfly