All vulnerabilities

Packagist

CVE-2026-59883

Guzzle: Cookie Disclosure and Injection via IP-Address Domains

Severity
Medium 4.7
Published
20 Jul 2026
Last changed
10 Sept 2026
Added to UpHeron
23 Oct 2026
Fixed in
7.12.3
Exploit chance
0.2% in the next 30 daysHigher than 6% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Information exposure (CWE-200)Origin validation error (CWE-346)Session fixation (CWE-384)
Attack
Over the network · Only under certain conditions · No login needed · Needs someone to click or open something
Attacker can
Read some data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Also known as
GHSA-g446-98w2-8p5w
Sources
OSV.dev and GitHub

Description

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.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

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.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
guzzlehttp/guzzlePackagist · osv:Packagist:guzzlehttp/guzzle
  • Every version before 7.12.3

About guzzlehttp/guzzle

Monthly downloads (Packagist)
35,230,404Packagist, 16 Nov 2026
Total downloads (Packagist)
1,162,991,182Packagist, 16 Nov 2026

References