CVE-2026-100724
http4k: `reverseProxy()` defaulted to substring (`Contains`) matching on `Host`; tightened to `Exact`
Description
Impact
reverseProxy() and reverseProxyRouting() matched configured vhosts by substring on the Host header (Contains matcher) by default. The intended use of these functions in http4k is outbound dispatch (e.g. matching AWS service subdomains, per the Contains docstring) and test-time composition of fake backend networks. In either of those contexts the matched Host is set by the calling application, not by an external attacker, so the loose match has no exploit surface.
If, however, reverseProxy() was deployed as a public-facing inbound HTTP handler — which the function technically supports but is not the documented intent — an external attacker could send Host: admin.evil.com and reach a vhost configured as admin, bypassing routing-based authorization.
The Contains matcher's docstring explicitly documented this loose behaviour, but because Contains was the default, callers who never read the matcher docs would still get the loose behaviour.
Who is affected: only deployments using reverseProxy() / reverseProxyRouting() as a public-facing inbound HTTP handler with two or more configured virtual hosts. The intended outbound / test-time usage is unaffected. If you did deploy reverseProxy() inbound and rely on multi-vhost routing for authorization, treat upgrade as urgent.
Patches
| Line | Fixed in | Edition |
|------|----------|---------|
| v6.x (Community) | 6.49.0.0 | Community |
| v5.x (LTS) | 5.42.0.0 | Enterprise — contact enterprise@http4k.org (if reverseProxy() is present in your v5.x line) |
| v4.x (LTS) | 4.51.0.0 | Enterprise — contact enterprise@http4k.org (if reverseProxy() is present in your v4.x line) |
The fix changes the default matcher to Exact. Existing callers that genuinely need substring matching (e.g. AWS subdomain dispatch) must explicitly pass matcher = Contains.
Workarounds
For deployments that cannot upgrade immediately: wrap your reverseProxy() with a host-allow-list filter that requires an exact match against expected vhost names before delegating.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.http4k » http4k-core | < 4.51.0.0>= 5.0.0.0, < 5.42.0.0>= 6.0.0.0, < 6.49.0.0 | 4.51.0.0, 5.42.0.0, 6.49.0.0 |
Blast radius
39% of the dependent artifacts (234) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 56,423 |
| 2 hops | 14,536 |
| 3 hops | 2,485 |
| 4 hops | 783 |
| 5 hops | 597 |
| 6 hops | 224 |
Most used dependents
- org.http4k » http4k-testing-approval94 usages
- org.http4k » http4k-connect-core-fake94 usages
- org.http4k » http4k-testing-hamkrest93 usages
- org.http4k » http4k-format-moshi79 usages
- org.http4k » http4k-connect-core71 usages
- org.http4k » http4k-config68 usages
- org.http4k » http4k-cloudnative54 usages
- org.http4k » http4k-connect-amazon-core54 usages
- org.http4k » http4k-format-jackson48 usages
- org.http4k » http4k-realtime-core47 usages
- com.orbitalhq » vyne-core-types44 usages
- org.http4k » http4k-format-core37 usages
- org.http4k » http4k-client-apache32 usages
- org.taxilang » compiler30 usages
- com.orbitalhq » taxiql-query-engine27 usages
Computed from the dependency graph of build 20261203.1441 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
| Package | http4k/http4k | github.com |
| Web | http4k/http4k advisory GHSA-jrpc-7vxp-69p6 | github.com |
| Web | http4k/http4k commit 0121b05 | github.com |
| Web | http4k/http4k commit 54c6385 | github.com |
| Web | http4k/http4k release 6.49.0.0 | github.com |
