CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-69215

CVE-2026-69215: Cross-Origin Cookie Leakage via Improper Domain and Path Matching in http4s CookieJar Client Middleware

Amit Schendel
Amit Schendel
Senior Security Researcher

Sep 16, 2026·6 min read·1 visit

Executive Summary (TL;DR)

An unanchored substring matching flaw in http4s's CookieJar client middleware allows session cookies to be leaked to attacker-controlled origins during outbound HTTP requests.

A medium-severity cross-origin cookie leakage vulnerability exists in the CookieJar client middleware of the http4s library. Due to unanchored substring searches used to determine whether a cookie applies to an outbound request, sensitive cookies (such as session IDs and credentials) can be inadvertently sent to unauthorized domains or paths.

Vulnerability Overview

The vulnerability lies within the client-side CookieJar middleware of the http4s library. http4s is a functional, streaming HTTP interface for Scala applications. When the CookieJar middleware is enabled, it acts as an automated repository for maintaining HTTP cookies across sequential requests.

The vulnerability is categorized as a failure to validate authority boundaries during cookie retrieval and propagation. In standard HTTP client implementations, cookie scoping must strictly adhere to the domain-matching and path-matching criteria defined in RFC 6265. This boundary ensures that sensitive authorization cookies are never transmitted to unauthorized origins.

Instead of implementing RFC 6265 compliant matching logic, the client middleware historically relied on unanchored substring comparisons. This mechanism causes the client to send sensitive cookies to unauthorized third-party domains or incorrect sub-paths under specific conditions. As a result, any application performing outbound requests to external, user-supplied, or redirected destinations is vulnerable to credential exposure.

Root Cause Analysis

The root cause of the cookie leakage is located in the cookieAppliesToRequest method inside the companion object of the CookieJar class. This method validates whether a stored ResponseCookie should be appended to a new outbound Request based on three main properties: the host domain, the path, and the connection security.

To determine domain eligibility, the vulnerable code evaluates if the requested URI host authority contains the cookie's domain attribute as a substring. It performs this evaluation using the Scala .contains method. Because the check is completely unanchored, a cookie intended for example.com is deemed applicable to any destination host that has example.com as a substring, such as evilexample.com or example.com.attacker.net.

Similarly, the path validation logic compares the target path against the cookie's path attribute using another unanchored .contains check. If a cookie is restricted to /admin, the middleware will attach it to requests heading to /administrator or /public/admin-docs. This violates path boundary rules and permits cross-path session exposure.

The following diagram illustrates how the vulnerable validation logic permits unauthorized cross-origin transmission of cookies.

Code Analysis

The code-level flaw is visible when comparing the vulnerable and patched implementations within CookieJar.scala. The vulnerable version evaluates both domain and path matching purely as raw string containment checks. This logic ignores structural boundaries such as dot delimiters in domains or slashes in paths.

// Vulnerable Implementation
private[middleware] def cookieAppliesToRequest[N[_]](
    r: Request[N],
    c: ResponseCookie,
): Boolean = {
  val domainApplies = c.domain.exists(s =>
    r.uri.host.forall { authority =>
      authority.renderString.contains(s) // Fails on evilexample.com
    }
  )
  val pathApplies = c.path.forall(s => r.uri.path.renderString.contains(s)) // Fails on /administrator
  // ...
}

To correct this vulnerability, the maintainers implemented helper methods called domainMatches and pathMatches which closely align with the rules of RFC 6265. These functions enforce exact matches, proper subdomain delegation, and path-segment boundaries.

// Patched Implementation
private def domainMatches(host: Uri.Host, cookieDomain: String): Boolean = {
  val requestHost = host.value.toLowerCase(Locale.ROOT)
  val domain = cookieDomain.toLowerCase(Locale.ROOT).stripPrefix(".")
  domain.nonEmpty && {
    host match {
      case _: Uri.Ipv4Address | _: Uri.Ipv6Address =>
        requestHost == domain
      case _: Uri.RegName =>
        requestHost == domain || requestHost.endsWith("." + domain)
    }
  }
}

In the patched domain-matching logic, case folding is explicitly performed using Locale.ROOT to prevent internationalization bypasses. Additionally, IP addresses are restricted to exact equality checks, while standard hostnames are validated to ensure they are either an exact match or a valid subdomain ending with a dot delimiter. This eliminates substring matching on sibling domains.

Exploitation Methodology

An attacker can exploit this vulnerability if they can coerce the vulnerable Scala application into dispatching an outbound request to an attacker-controlled destination. Common vectors to achieve this include Server-Side Request Forgery (SSRF) vulnerabilities, user-defined webhooks, or open redirects. The attacker does not need prior authorization to exploit this flaw.

Consider an application that allows users to provide an external image URL for profile customization. If the application first communicates with https://example.com and obtains a session cookie, that cookie is stored in the CookieJar middleware. Subsequent requests initiated by the same client wrapper will reuse this state.

When the application attempts to fetch the attacker's image hosted at http://evilexample.com, the CookieJar matches "evilexample.com" with the stored "example.com" domain. The client then includes the Cookie header in the outbound HTTP request. The attacker's server captures the request headers, thereby compromising the session credentials of the application.

Impact Assessment

The impact of this vulnerability is the compromise of confidential credentials and session tokens managed by the http4s client. Depending on the architecture, this can lead to privilege escalation or unauthorized system access on behalf of the vulnerable application. If the cookie contains administrative session keys, the entire upstream platform may be compromised.

The Common Vulnerability Scoring System (CVSS) v3.1 base score of 6.8 reflects a Network attack vector with High confidentiality impact and High complexity. The complexity is high because the attacker must find a way to receive outbound traffic from the application and register domain names containing the victim's domain name as a substring. No user interaction is required for the leak to happen.

This vulnerability has not been observed in active exploitation in the wild, and it is not listed in CISA's Known Exploited Vulnerabilities catalog. However, the ease of exploitation once an outbound request trigger exists makes prompt remediation highly recommended. Security teams must treat any client-side cookie leakage as a high-priority exposure.

Remediation & Mitigation

The primary recommendation is to update the http4s library to a version that implements proper RFC 6265 cookie matching. For the 0.23.x stable branch, update to version 0.23.35 or higher. For the 1.0.x milestone branch, upgrade to 1.0.0-M47 or higher.

If an immediate library upgrade is not possible, you can disable the CookieJar middleware on the client if cookie state management is not required. Avoiding the inclusion of this middleware entirely eliminates the vulnerable code path. Developers should review whether cookie tracking is strictly necessary for client-side API integrations.

Alternatively, you can implement strict outbound request filtering. Enforcing a strict domain allowlist for outbound HTTP connections prevents the client from transmitting requests to arbitrary attacker-controlled hostnames, reducing the risk of cookie exfiltration. This provides defense-in-depth against credential theft.

Official Patches

http4sOfficial security advisory for CVE-2026-69215
http4sOfficial fix commit implementing RFC 6265 domain and path matching

Fix Analysis (1)

Technical Appendix

CVSS Score
6.8/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N

Affected Systems

http4s client library with CookieJar middleware enabled

Affected Versions Detail

Product
Affected Versions
Fixed Version
http4s-client
http4s
< 0.23.350.23.35
http4s-client
http4s
>= 1.0.0-M1, < 1.0.0-M471.0.0-M47
AttributeDetail
CWE IDCWE-565, CWE-1275
Attack VectorNetwork (AV:N)
CVSS v3.1 Score6.8 (Medium)
EPSS ScoreNegligible
ImpactHigh Confidentiality Loss (Cookie Exfiltration)
Exploit StatusPoC available in test suite, no weaponized exploits in wild
KEV StatusNot listed in CISA KEV

MITRE ATT&CK Mapping

T1539Steal Web Session Cookie
Credential Access
T1557Adversary-in-the-Middle
Credential Access / Collection
CWE-565
Reliance on Cookies without Validation and Integrity Checking

The system uses information from a cookie to make security-critical decisions without validating the authority boundary of the receiver relative to the cookie's target domain.

References & Sources

  • [1]GitHub Security Advisory GHSA-grh8-3p95-f9rr
  • [2]GitHub Commit c0a37f38d5ee2a568ba57bd9da62f8d79b8b1fcc
  • [3]http4s Release v0.23.35
  • [4]http4s Release v1.0.0-M47
  • [5]NVD Detail CVE-2026-69215
  • [6]CVE.org Record CVE-2026-69215

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•6 minutes ago•CVE-2026-69213
7.5

CVE-2026-69213: Uncontrolled Resource Consumption (DoS) in http4s Ember HTTP/2 Implementation

An uncontrolled resource consumption vulnerability (CVE-2026-69213) in the http4s Ember HTTP/2 server and client implementations allows unauthenticated remote attackers to trigger an OutOfMemoryError (OOM) and cause a Denial of Service (DoS) by exploiting unbounded outbound queues.

Amit Schendel
Amit Schendel
0 views•7 min read
•37 minutes ago•CVE-2026-60137
5.9

CVE-2026-60137: SQL Injection in WordPress Core WP_Query Class via author__not_in Parameter

CVE-2026-60137 is a critical SQL injection vulnerability in the Core component of WordPress. The flaw occurs within the WP_Query class during the processing of the author__not_in parameter, where user-supplied array inputs are constructed into a SQL string without strict integer type-casting. When chained with CVE-2026-63030, an unauthenticated remote attacker can exploit this SQL injection to read database values, extract administrator credential hashes, or modify administrative options to execute arbitrary PHP code on the server.

Amit Schendel
Amit Schendel
2 views•5 min read
•about 1 hour ago•CVE-2026-69214
6.8

CVE-2026-69214: Session Fixation via Arbitrary Set-Cookie Domain Acceptance in http4s CookieJar Middleware

A validation flaw exists in the CookieJar client middleware of the http4s library. Prior to versions 0.23.35 and 1.0.0-M47, the middleware trusts server-supplied Domain attributes in HTTP Set-Cookie response headers without confirming that the domain matches the origin host. A malicious server can leverage this to register unauthorized cookies targeting different domains, creating potential session fixation or cookie poisoning vectors.

Alon Barad
Alon Barad
3 views•5 min read
•about 3 hours ago•CVE-2026-69216
5.4

CVE-2026-69216: HTTP Request/Response Smuggling in http4s Ember Parser

An HTTP Request/Response Smuggling vulnerability (CVE-2026-69216) was identified in the Ember chunked transfer encoding decoder of the http4s Scala library. Due to parser leniency accepting sign prefixes, surrounding whitespace, and missing trailing CRLFs, attackers can bypass proxy security boundaries, poison shared caches, or hijack request queues.

Amit Schendel
Amit Schendel
2 views•5 min read
•about 4 hours ago•CVE-2026-69218
7.5

CVE-2026-69218: Denial of Service via Unbounded HTTP/2 Continuation Frame Buffering in http4s Ember

A critical resource exhaustion vulnerability exists in the http4s Ember HTTP/2 server and client implementations. By failing to limit the size or quantity of incoming HTTP/2 CONTINUATION frames, the engine allows unauthenticated remote attackers to exhaust JVM heap memory, causing a complete Denial of Service.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 5 hours ago•CVE-2026-69201
5.9

CVE-2026-69201: Path Traversal and Directory Escape in http4s Static Content Services

CVE-2026-69201 is a critical directory traversal vulnerability in the http4s Scala library. Affected versions of ResourceService and WebjarService allow attackers to escape the configured resource directory and access arbitrary files on the classpath or filesystem by using percent-encoded path separators. The flaw arises from decoding URL segments prior to validating them against directory escape patterns.

Alon Barad
Alon Barad
5 views•8 min read