CVE-2026-69245: Guzzle: Noncanonical cookie domain keeps subdomain scope
Impact
SetCookie::matchesDomain() gives every subdomain of a cookie Domain that cookie unless it recognizes the Domain as an IP literal or a numeric host, and it decides that from the domain's own text, so two spellings a transport reads as an address keep subdomain scope. On 7.15, hexadecimal and mixed-base forms such as 0x7f000001 and 0177.0.0.0x1 go unrecognized while libcurl 8.21.0 reads both as 127.0.0.1, so closing them completes the rule GHSA-g446-98w2-8p5w (CVE-2026-59883) set out to establish, which cited the WHATWG IPv4 parser and so already admitted a 0x part. A percent-escaped Domain keeps that scope on both branches for a different reason: percent-decoding sits above numeric parsing, so 192.168.0.%31 and 127.0.0.1%2e are registered names in the URI grammar rather than address literals, and no numeric rule in any base classifies them, while libcurl decodes the host before it resolves and reads them as 192.168.0.1 and 127.0.0.1. The escape must fall in the rightmost label on 8.0.0, which already catches a decimal, octal or 0x part there, but not on 7.15, where %31%32%37.0.0.0x1 also reads as 127.0.0.1; 8.0.0 is affected in the percent spelling alone.
Both directions of the defect are reproduced over a real socket. A cookie stored for Domain=0x7f000001 is placed in the Cookie header of a request to evil.0x7f000001, disclosing a session identifier or token to a host that is not that address, and a response from evil.0x7f000001 setting Domain=0x7f000001 is accepted into the jar and replayed to the address, so a server answering for the look-alike name can fix a session or set application state.
Exploitation requires the application to enable cookie support, address an origin by one of these spellings, and contact a host whose name ends in it. No public DNS delegation provides such a name, so the exposure is to private, split-horizon and container zones. Applications that do not use Guzzle's cookies, that keep a separate jar for each host or trust boundary, or that address origins only by ordinary names are not affected.
Patches
This is a summary; the patches are the authority. The issue is fixed in 7.15.2 and 8.0.1, which hold a cookie Domain containing a % byte to an exact match against the request host. 7.15.2 additionally holds to an exact match a Domain whose every dot-separated part is decimal, octal or hexadecimal, a rule wide enough that 0x100000000, a name to libcurl, loses subdomain matching too; 8.0.0 already recognizes a 0x-prefixed rightmost label. One class stays open: an IDN-capable transport reads a fullwidth-digit Domain such as 127.0.0.1 as 127.0.0.1 while Guzzle matches it by suffix, and these patches do not close that. Versions before 7.15.2 and version 8.0.0 are affected, 8.0.0 in the percent spelling alone.
Workarounds
If you cannot upgrade, do not share one CookieJar between an origin addressed by a numeric or percent-escaped spelling and any other host ending in that spelling. Use a separate jar for each host or trust boundary, or address such an origin by its canonical dotted-decimal form, writing 127.0.0.1, which released versions already hold to an exact match, rather than 0x7f000001 or 127.0.0.%31. Rejecting a request URI host that contains a percent escape, before you hand the URI to Guzzle and on every redirect hop, closes that spelling, and rejecting a non-ASCII byte closes the fullwidth one, but nothing outside the jar closes the hexadecimal one.
Do not use filtervar() with FILTERVALIDATEIP to decide whether a domain is an address: it rejects 0x7f000001 and 127.0.0.%31, which a transport reads as 127.0.0.1.
Other sources
Guzzle is an extensible PHP HTTP client. Prior to 7.15.2 and 8.0.1, SetCookie::matchesDomain() gives every subdomain of a cookie Domain that cookie unless SetCookie::matchesDomain() recognizes the Domain as an IP literal or a numeric host, and the decision comes from the domain's own text, so two spellings a transport reads as an address keep subdomain scope. Hexadecimal and mixed-base forms such as 0x7f000001 and 0177.0.0.0x1 go unrecognized while libcurl 8.21.0 reads both as 127.0.0.1. A percent-escaped Domain keeps that scope on both branches because percent-decoding sits above numeric parsing, so 192.168.0.%31 and 127.0.0.1%2e are registered names in the URI grammar rather than address literals, and no numeric rule in any base classifies them, while libcurl decodes the host before resolving and reads them as 192.168.0.1 and 127.0.0.1. A cookie stored for Domain=0x7f000001 is placed in the Cookie header of a request to evil.0x7f000001, disclosing a session identifier or token to a host that is not that address, and a response from evil.0x7f000001 setting Domain=0x7f000001 is accepted into the jar and replayed to the address, so a server answering for the look-alike name can fix a session or set application state. Exploitation requires the application to enable cookie support, address an origin by one of these spellings, and contact a host whose name ends in that spelling. This issue is fixed in versions 7.15.2 and 8.0.1.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/guzzlehttp/guzzleto a version that resolves this vulnerability.Fixed in 8.0.1 - Upgrade
Upgrade
composer/guzzlehttp/guzzleto a version that resolves this vulnerability.Fixed in 7.15.2 - Upgrade
Upgrade
Guzzleto a version that resolves this vulnerability.Fixed in 7.15.2 - Upgrade
Upgrade
Guzzleto a version that resolves this vulnerability.Fixed in 8.0.1 - Configuration
If you cannot upgrade, do not share one CookieJar between an origin addressed by a numeric or percent-escaped spelling and any other host ending in that spelling; use a separate jar for each host or trust boundary.
Guzzle CookieJar usage CookieJar separation = separate per host or trust boundary - Configuration
Before handing the URI to Guzzle and on every redirect hop, reject a request URI host that contains a percent escape to close the percent-escaped Domain spelling. (Also reject non-ASCII bytes to close fullwidth-digit Domain.)
Application request URI handling Reject percent-escaped hosts before Guzzle = reject when URI host contains a percent escape (before handoff and on every redirect hop) - Configuration
Address the origin by its canonical dotted-decimal form (e.g., write 127.0.0.1) instead of using spellings like 0x7f000001 or 127.0.0.%31.
Application origin addressing Origin host representation = use canonical dotted-decimal form - Compensating control
If cookie support is enabled in the application, reduce exposure by ensuring requests do not contact hosts whose name ends in the noncanonical cookie-domain spelling (e.g., look-alike names ending in 0x7f000001 / 127.0.0.%31), because exploitation requires cookie support and contacting such a host.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-69245?
CVE-2026-69245 has a medium severity rating of 6.5.
What is the impact of CVE-2026-69245?
CVE-2026-69245 allows for every subdomain of a cookie's Domain to share the cookie unless the Domain is recognized as an IP literal or numeric host.
How do I fix CVE-2026-69245?
To mitigate CVE-2026-69245, upgrade Guzzle to a version that addresses this vulnerability.
Which versions of Guzzle are affected by CVE-2026-69245?
CVE-2026-69245 affects Guzzle versions prior to the fix released after August 3, 2026.
What should I do if I use affected versions of Guzzle due to CVE-2026-69245?
If you are using affected versions of Guzzle, you should immediately plan an upgrade to the latest secure version.