CVE-2026-69215
Http4s: CookieJar middleware matches by substring, leaking cookies cross-origin
Description
The CookieJar client middleware decides whether to attach a cookie to an outgoing request using an unanchored substring test on the host and path, instead of the domain match specified by RFC6265 5.1.3. A cookie stored for example.com is therefore sent to any host whose name merely contains example.com (e.g. evilexample.com), leaking potentially sensitive cookies to an attacker-chosen host.
Impact
Disclosure of session and authentication cookies to an attacker-controlled host, enabling session hijack of the application's outbound calls.
Preconditions
- Application uses the
CookieJarclient middleware. - Application can be induced to make an outbound request to a host controlled by the attacker, where the hostname contains the targeted domain as a substring.
Workarounds
- Do not use the
CookieJarwith clients that fetch attacker-influenced URLs - Apply a separate
CookieJarper trusted origin.
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.http4s » http4s-client_2.12 | < 0.23.35 | 0.23.35 |
| org.http4s » http4s-client_2.13 | < 0.23.35>= 1.0.0-M1, < 1.0.0-M47 | 0.23.35, 1.0.0-M47 |
| org.http4s » http4s-client_3 | < 0.23.35>= 1.0.0-M1, < 1.0.0-M47 | 0.23.35, 1.0.0-M47 |
Blast radius
85% of the dependent artifacts (666) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 12,519 |
| 2 hops | 16,108 |
| 3 hops | 6,623 |
| 4 hops | 3,487 |
| 5 hops | 7,244 |
| 6 hops | 5,117 |
Most used dependents
- org.http4s » http4s-blaze-client252 usages
- org.http4s » http4s-ember-client144 usages
- net.shrine » shrine-util39 usages
- net.shrine » shrine-protocol32 usages
- io.chrisdavenport » http4s-grpc23 usages
- org.http4s » http4s-async-http-client20 usages
- org.http4s » http4s-jdk-http-client20 usages
- io.github.pityka » tasks-core17 usages
- io.chrisdavenport » http4s-grpc-google-common-protos17 usages
- es.weso » srdfjena17 usages
- net.shrine » shrine-qep16 usages
- com.47deg » github4s16 usages
- net.shrine » shrine-auth15 usages
- org.http4s » http4s-dom15 usages
- net.playq » tk-test15 usages
Computed from the dependency graph of build 20261124.0621 (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 | http4s/http4s | github.com |
| Web | http4s/http4s advisory GHSA-grh8-3p95-f9rr | github.com |
| Web | http4s/http4s commit c0a37f3 | github.com |
| Web | http4s/http4s release v0.23.35 | github.com |
| Web | http4s/http4s release v1.0.0-M47 | github.com |
