CVE-2026-59883: Guzzle: Cookie Disclosure and Injection via IP-Address Domains

Published Jul 8, 2026
·
Updated

Impact

CookieJar does not restrict a cookie scoped to an IP address to the exact host that set it. When a stored cookie's Domain attribute is an IPv4 literal (Domain=192.168.0.1), a bracketed IPv6 literal (Domain=[::1]), or a bare numeric value that denotes an IPv4 address (Domain=1, which is 0.0.0.1), SetCookie::matchesDomain() applies ordinary subdomain (suffix) matching to it instead of requiring an exact host. The IP-address check inside matchesDomain() is applied only to the request host and never to the cookie's own domain, and response cookies that carry an explicit Domain attribute are stored as suffix-matchable. As a result Guzzle sends such a cookie to any host whose name ends in that value as a trailing label, for example sending a Domain=192.168.0.1 cookie to evil.192.168.0.1, or a Domain=1 cookie to evil.1. The same flaw lets a look-alike host store a cookie that Guzzle then sends to the bare IP address. Depending on how the receiving service interprets the cookie, the impact is cross-host cookie disclosure, cookie injection, or session fixation.

You are affected if your application uses Guzzle's cookie support, for example new Client(['cookies' => true]) or an explicit CookieJar, reuses one cookie jar across more than one host or trust boundary, and that jar can hold a cookie scoped to an IP-address or bare-numeric host. To actually leak a cookie the application must also resolve and connect to a look-alike host whose name ends in the IP-address label, such as evil.192.168.0.1. Such names are not publicly registrable, so in practice an attacker needs some influence over name resolution, which is realistic on private, split-horizon, container, or development networks. You are not affected if you do not use Guzzle's cookie support, if you use a separate cookie jar per host or trust boundary, or if your jars never hold cookies scoped to IP-address or bare-numeric hosts. This issue is independent of public suffix list validation. Per RFC 6265, an IP-address cookie domain must match only the exact host that set it and must never match a subdomain.

Patches

The issue is patched in 7.12.3 and later. Starting in that release, Guzzle matches an IPv4 literal, a bracketed IPv6 literal, or a bare-numeric cookie Domain only against the exact request host, and no longer applies subdomain suffix matching to them.

Workarounds

If you cannot upgrade immediately, do not reuse one CookieJar instance across untrusted and trusted origins. Use a separate cookie jar per host or trust boundary, or disable cookie handling for requests to untrusted hosts, and avoid scoping cookies to IP-address or bare-numeric hosts. In particular, avoid new Client(['cookies' => true]) for any client that may contact unrelated hosts at different trust levels, because that option creates a single shared jar for the whole client.

References

https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.3 https://datatracker.ietf.org/doc/html/rfc6265#section-5.3 https://url.spec.whatwg.org/#concept-ipv4-parser

Other sources

Guzzle is an extensible PHP HTTP client. Prior to 7.12.3, CookieJar did not restrict cookies scoped to IP-address or bare-numeric Domain values to the exact host that set them, because SetCookie::matchesDomain() applied ordinary suffix matching to domains such as 192.168.0.1, [::1], or 1, allowing cross-host cookie disclosure, cookie injection, or session fixation. This issue is fixed in version 7.12.3.

MITRE

Affected Software

3 affected componentsFixes available
Guzzle Guzzle<7.12.3
Guzzlephp Guzzle<7.12.3
composer/guzzlehttp/guzzle<7.12.3
7.12.3

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.3
  2. Upgrade

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

    Fixed in 7.12.3
  3. Configuration

    If you cannot upgrade immediately, disable Guzzle cookie handling for requests that may contact untrusted hosts (avoid using `new Client(['cookies' => true])`).

    Guzzle CookieJar / HTTP client cookie handling cookies = false
  4. Configuration

    If you cannot upgrade immediately, do not reuse one CookieJar instance across untrusted and trusted origins; use a separate cookie jar per host or trust boundary.

    Guzzle CookieJar usage cookie_jar_isolation = separate per host or trust boundary

Event History

Jul 8, 2026
CVE Published
via MITRE·03:56 PM
Data Sourced
via MITRE·03:56 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jul 20, 2026
Advisory Published
via GitHub·10:00 PM
Data Sourced
via GitHub·10:00 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-59883?

The severity of CVE-2026-59883 is medium with a score of 6.1.

2

What types of attacks can CVE-2026-59883 facilitate?

CVE-2026-59883 can facilitate cookie disclosure and injection attacks via IP-address domains.

3

How do I fix CVE-2026-59883?

To fix CVE-2026-59883, update Guzzle to version 7.12.3 or later.

4

What is affected by CVE-2026-59883?

CVE-2026-59883 affects the Guzzle PHP HTTP client versions prior to 7.12.3.

5

How does CVE-2026-59883 impact cookie security?

CVE-2026-59883 impacts cookie security by allowing cookies scoped to IP-address domains to be improperly shared across hosts.

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