Summary
Http4s: CookieJar middleware accepts arbitrary Set-Cookie domain
Advisory details
When processing a Set-Cookie from a response, the CookieJar client middleware trusts the server-supplied Domain attribute verbatim, with no check that it domain-matches the host that sent the cookie (RFC6265 §5.3 step 6) and no public suffix check. A malicious or compromised server can therefore plant a cookie for any domain in the cookie jar, which is subsequently set on the client's next request to that victim domain, enabling session fixation or overwriting security-relevant cookies.
Impact
Session fixation and overwrite of security-relevant cookies for arbitrary domains contacted by the same wrapped client.
Preconditions
- Application uses the
CookieJarclient middleware. - Application contacts an attacker-controlled (or compromised) server using the same jar it uses for trusted hosts.
Workarounds
- Do not share a
CookieJaracross trusted and untrusted targets.
Note
This middleware still does not implement public suffix rejection.
References
- https://github.com/advisories/GHSA-wv64-j4fq-5f9x
- https://github.com/http4s/http4s/security/advisories/GHSA-wv64-j4fq-5f9x
- https://github.com/http4s/http4s/commit/87535f7288f3baaf6736e2735087e473762b5b2f
- https://github.com/http4s/http4s/releases/tag/v0.23.35
- https://github.com/http4s/http4s/releases/tag/v1.0.0-M47
Related vulnerabilities
All Supply chain →- MEDIUMCVE-2026-107226
AsyncHttpClient: Cookies received over plaintext HTTP can plant, overwrite or delete Secure cookies set over HTTPS
- MEDIUMCVE-2026-57179
social-auth-core has a Session Fixation issue
- HIGHCVE-2026-61687
Hatchet - Unauthenticated OAuth state CSRF / login-CSRF via empty-state collision in ValidateOAuthState
- HIGHCVE-2026-61592
djust: SSE sessions are not bound to the authenticated user; the client-chosen session_id is the sole authorization capability (session hijack)
- MEDIUMCVE-2026-69215
Http4s: CookieJar middleware matches by substring, leaking cookies cross-origin
- HIGHCVE-2026-96627
Arcane: Delegated users:update permission allows admin account takeover via password reset (no privilege-hierarchy check)