{"id":"CVE-2022-29248","published":"2022-05-25T00:00:00Z","modified":"2025-04-23T18:21:56Z","title":"Cross-domain cookie leakage in Guzzle","vendor":"guzzle","product":"guzzle","tier":"tail","description":{"text":"Guzzle is a PHP HTTP client. Guzzle prior to versions 6.5.6 and 7.4.3 contains a vulnerability with the cookie middleware. The vulnerability is that it is not checked if the cookie domain equals the domain of the server which sets the cookie via the Set-Cookie header, allowing a malicious server to set cookies for unrelated domains. The cookie middleware is disabled by default, so most library consumers will not be affected by this issue. Only those who manually add the cookie middleware to the handler stack or construct the client with ['cookies' => true] are affected. Moreover, those who do not use the same Guzzle client to call multiple domains and have disabled redirect forwarding are not affected by this vulnerability. Guzzle versions 6.5.6 and 7.4.3 contain a patch for this issue. As a workaround, turn off the cookie middleware.","provenance":"source","from":"CVE.org"},"cvss":{"score":8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01351,"percentile":0.72198,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"references":[{"url":"https://github.com/guzzle/guzzle/security/advisories/GHSA-cwmx-hcrq-mhc3","tags":[]},{"url":"https://github.com/guzzle/guzzle/pull/3018","tags":[]},{"url":"https://github.com/guzzle/guzzle/commit/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab","tags":[]},{"url":"https://www.drupal.org/sa-core-2022-010","tags":[]},{"url":"https://www.debian.org/security/2022/dsa-5246","tags":["vendor-advisory"]}],"priority":{"score":20.0,"factors":[{"name":"EPSS percentile","points":14.44},{"name":"CVSS severity","points":5.6}]},"vendorSlug":"guzzle","affectedVersions":[{"vendor":"guzzle","product":"guzzle","versions":["< 6.5.6",">= 7.0.0, < 7.4.3"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-04-23T15:52:51.158271Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Packagist","package":"guzzlehttp/guzzle","vulnerableRanges":["<6.5.6",">=7.0.0, <7.4.3"],"patched":["6.5.6","7.4.3"],"from":["GHSA-cwmx-hcrq-mhc3"],"provenance":"source"},{"ecosystem":"Packagist","package":"drupal/core","vulnerableRanges":[">=8.0.0, <9.2.20",">=9.3.0, <9.3.14"],"patched":["9.2.20","9.3.14"],"from":["DRUPAL-CORE-2022-010"],"provenance":"source"}],"summary":{"text":"Guzzle, the PHP HTTP client library, fails to verify that a cookie's domain matches the domain of the server sending the Set-Cookie header, so the flaw sits in its cookie middleware. An attacker operating a malicious server can set cookies for unrelated domains, but only where the cookie middleware is manually added to the handler stack or enabled via ['cookies' => true], the same client is used to call multiple domains, and redirect forwarding is not disabled, with user interaction required for exploitation.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:15:01Z"},"euvd":{"id":"EUVD-2022-3650","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-guzzle-cve-2022-29248","children":[{"from":"CVE-2022-29248","to":"CVE-2026-67353","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/Cookie/CookieJar.php"],"commits":["https://github.com/guzzle/guzzle/commit/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab","https://github.com/guzzle/guzzle/commit/7b68220d6543f6f80fe62e633361fc9d4ead14d4"],"basis":"shared function","functions":["extractCookies"]}]},{"from":"CVE-2022-29248","to":"CVE-2026-67354","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/Cookie/CookieJar.php"],"commits":["https://github.com/guzzle/guzzle/commit/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab","https://github.com/guzzle/guzzle/commit/7b68220d6543f6f80fe62e633361fc9d4ead14d4"],"basis":"shared function","functions":["extractCookies"]}]},{"from":"CVE-2022-29248","to":"CVE-2026-67355","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/Cookie/CookieJar.php"],"commits":["https://github.com/guzzle/guzzle/commit/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab","https://github.com/guzzle/guzzle/commit/7b68220d6543f6f80fe62e633361fc9d4ead14d4"],"basis":"shared function","functions":["extractCookies"]}]}],"packageHistory":[{"cve":"CVE-2022-24775","published":"2022-03-21","fixed":"9.3.9","kev":false},{"cve":"CVE-2022-25273","published":"2023-04-26","fixed":"9.3.12","kev":false},{"cve":"CVE-2022-25274","published":"2023-04-26","fixed":"9.3.12","kev":false},{"cve":"CVE-2022-29248","published":"2022-05-25","fixed":"9.3.14","kev":false},{"cve":"CVE-2022-31042","published":"2022-06-09","fixed":"9.3.16","kev":false,"link":{"from":"CVE-2022-29248","to":"CVE-2022-31042","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:drupal/core","fromFixed":"9.2.20","toFixed":"9.2.21","daysApart":15},{"kind":"version-step","provenance":"source","package":"Packagist:guzzlehttp/guzzle","fromFixed":"6.5.6","toFixed":"6.5.7","daysApart":15}]}},{"cve":"CVE-2022-31043","published":"2022-06-09","fixed":"9.3.16","kev":false,"link":{"from":"CVE-2022-29248","to":"CVE-2022-31043","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Packagist:drupal/core","fromFixed":"9.2.20","toFixed":"9.2.21","daysApart":15},{"kind":"version-step","provenance":"source","package":"Packagist:guzzlehttp/guzzle","fromFixed":"6.5.6","toFixed":"6.5.7","daysApart":15}]}},{"cve":"CVE-2022-25275","published":"2023-04-26","fixed":"9.4.3","kev":false}],"package":"Packagist:drupal/core"}}