CVE-2026-55767: Guzzle: Dot-Only Cookie Domains Match All Hosts in guzzlehttp/guzzle

Published Jun 19, 2026
·
Updated

Impact

CookieJar incorrectly accepts cookies with a dot-only Domain attribute, such as Domain=., Domain=.., Domain=..., and whitespace-padded variants such as Domain= . . In affected versions, SetCookie::matchesDomain() removes leading dots from the cookie domain, normalizing dot-only values to the empty string; SetCookie::validate() only rejected a strictly empty domain, so these cookies could be stored and the empty normalized domain was treated as matching any request host.

An attacker-controlled origin that an application requests with a shared cookie jar can therefore set a cookie that Guzzle later sends to unrelated hosts using the same jar. This may allow cookie injection or session fixation against downstream services, depending on how those services interpret the injected cookie. Applications are affected when they use Guzzle's cookie support, for example new Client(['cookies' => true]) or an explicit shared CookieJar, and reuse the same jar across attacker-controlled and trusted origins.

Applications that do not use Guzzle's cookie support, or that use separate cookie jars per origin or trust boundary, are not affected. This issue is distinct from public suffix list validation: dot-only domains contain no domain label and should not match unrelated hosts.

Patches

The issue is patched in 7.12.1 and later. Starting in that release, Guzzle rejects dot-only cookie Domain attributes and prevents an empty normalized cookie domain from matching any request host.

Workarounds

If you cannot upgrade immediately, do not reuse the same CookieJar instance across untrusted and trusted origins. Use separate cookie jars per origin or trust boundary, or disable cookie handling for requests to untrusted hosts.

Avoid using new Client(['cookies' => true]) for clients that may contact unrelated hosts with different trust levels, because that option creates one shared jar for the client.

Other sources

Guzzle is an extensible PHP HTTP client. Prior to 7.12.1, CookieJar incorrectly accepts cookies with a dot-only Domain attribute and whitespace-padded variants. SetCookie::matchesDomain() removes leading dots from the cookie domain, normalizing dot-only values to the empty string; SetCookie::validate() only rejected a strictly empty domain, so these cookies could be stored and the empty normalized domain was treated as matching any request host. An attacker-controlled origin that an application requests with a shared cookie jar can therefore set a cookie that Guzzle later sends to unrelated hosts using the same jar. This may allow cookie injection or session fixation against downstream services, depending on how those services interpret the injected cookie. This vulnerability is fixed in 7.12.1.

MITRE

Affected Software

2 affected componentsFixes available
composer/guzzlehttp/guzzle<7.12.1
7.12.1
Guzzlephp Guzzle<7.12.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/guzzlehttp/guzzle to a version that resolves this vulnerability.

    Fixed in 7.12.1
  2. Upgrade

    Upgrade guzzlehttp/guzzle to a version that resolves this vulnerability.

    Fixed in 7.12.1
  3. Configuration

    Do not use `new Client(['cookies' => true])` for clients that may contact unrelated hosts with different trust levels, because that option creates one shared cookie jar for the client.

    Guzzle HTTP client (Cookie handling) Client option cookies = false
  4. Configuration

    If you cannot upgrade immediately, do not reuse the same `CookieJar` instance across attacker-controlled/untrusted and trusted origins; use separate cookie jars per origin (or per trust boundary).

    Guzzle CookieJar usage CookieJar instance sharing = separate per origin/trust boundary
  5. Configuration

    If you cannot upgrade immediately, disable cookie handling for requests to untrusted hosts (so Guzzle does not send cookies derived from untrusted origins to unrelated hosts).

    Guzzle Cookie handling for untrusted hosts Cookie handling = disabled for untrusted hosts

Event History

Jun 19, 2026
Advisory Published
via GitHub·02:37 PM
Data Sourced
via GitHub·02:37 PM
DescriptionSeverityWeaknessAffected Software
Jun 23, 2026
CVE Published
via MITRE·03:05 PM
Data Sourced
via MITRE·03:05 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·04:17 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-55767?

The severity of CVE-2026-55767 is rated as medium with a score of 5.8.

2

What impact does CVE-2026-55767 have on applications?

CVE-2026-55767 allows the `CookieJar` to incorrectly accept cookies with a dot-only `Domain` attribute, potentially leading to incorrect domain matching.

3

How do I fix CVE-2026-55767?

To fix CVE-2026-55767, upgrade to a patched version of the composer/guzzlehttp/guzzle library that addresses this vulnerability.

4

Which software is affected by CVE-2026-55767?

CVE-2026-55767 affects the composer/guzzlehttp/guzzle library.

5

When was CVE-2026-55767 published?

CVE-2026-55767 was published on June 19, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203