Skip to content

Http4s: CookieJar middleware matches by substring, leaking cookies cross-origin

Moderate severity GitHub Reviewed Published Jul 6, 2026 in http4s/http4s • Updated Sep 15, 2026

Package

maven org.http4s:http4s-client_2.12 (Maven)

Affected versions

<= 0.23.34

Patched versions

0.23.35
maven org.http4s:http4s-client_2.13 (Maven)
<= 0.23.34
>= 1.0.0-M1, <= 1.0.0-M46
0.23.35
1.0.0-M47
maven org.http4s:http4s-client_3 (Maven)
<= 0.23.34
>= 1.0.0-M1, <= 1.0.0-M46
0.23.35
1.0.0-M47

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 CookieJar client 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 CookieJar with clients that fetch attacker-influenced URLs
  • Apply a separate CookieJar per trusted origin.

References

@rossabaker rossabaker published to http4s/http4s Jul 6, 2026
Published to the GitHub Advisory Database Sep 15, 2026
Reviewed Sep 15, 2026
Last updated Sep 15, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(41st percentile)

Weaknesses

Reliance on Cookies without Validation and Integrity Checking

The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user. Learn more on MITRE.

Sensitive Cookie with Improper SameSite Attribute

The SameSite attribute for sensitive cookies is not set, or an insecure value is used. Learn more on MITRE.

CVE ID

CVE-2026-69215

GHSA ID

GHSA-grh8-3p95-f9rr

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.