GHSA-wm3w-8rrp-j577: Guzzle: Host-only cookie scope is not preserved
(updated )
In affected versions, CookieJar does not preserve whether a response cookie was set without a Domain attribute or with an empty one. A cookie without Domain is host-only and must be returned only to the exact host that set it. Under current cookie processing rules, an empty Domain value is also host-only. Guzzle instead stores the request host in the cookie’s Domain field and later applies ordinary domain matching, as though the server had supplied a valid domain. For example, a host-only sid=secret cookie set by example.com can subsequently be sent to child.example.com. FileCookieJar and SessionCookieJar also persist the request host without recording the host-only state, so reloading a jar preserves the widened scope.
An attacker who controls or can observe a child host can therefore receive cookies that were intended only for its parent host. Depending on the cookie, this can disclose session identifiers, authorization tokens, or other sensitive state. Exploitation requires the application to enable Guzzle’s cookie support, reuse the same built-in cookie jar, receive a host-only cookie from a parent host, and later make a matching request to a less-trusted child host. The cookie’s other restrictions still apply. Its path must match, a Secure cookie is sent only over a secure connection, and an expired cookie is not sent.
Applications that do not use Guzzle’s cookie support are not affected. Applications are also not affected by this disclosure if they use a separate jar for every host or trust boundary, never request a less-trusted subdomain with the same jar, or only store cookies carrying a valid, non-empty Domain attribute. The incorrect behavior occurs between an otherwise valid parent host and its subdomains.
References
- github.com/advisories/GHSA-wm3w-8rrp-j577
- github.com/guzzle/guzzle/commit/7b68220d6543f6f80fe62e633361fc9d4ead14d4
- github.com/guzzle/guzzle/pull/3901
- github.com/guzzle/guzzle/releases/tag/7.15.1
- github.com/guzzle/guzzle/security/advisories/GHSA-wm3w-8rrp-j577
- nvd.nist.gov/vuln/detail/CVE-2026-67355
- www.vulncheck.com/advisories/guzzlehttp-guzzle-before-host-only-cookie-scope
Code Behaviors & Features
Detect and mitigate GHSA-wm3w-8rrp-j577 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →