Skip to content
Heist/ feed
Back to feed
High

Cross-domain cookie leakage in Guzzle

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2022-29248
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 17:21 UTC · Revision 1

Source evidence

Cross-domain cookie leakage in Guzzle

core-osv · Original source

Published 25 May 2022, 00:00 UTC

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.

osv:CVE-2022-29248
Complete source record
{
  "id": "10c60d116fd7a8a10e15a7eab2151af98eed92ad4308cb856dd7ff85ffc51ca7",
  "url": "https://osv.dev/vulnerability/CVE-2022-29248",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Cross-domain cookie leakage in Guzzle",
    "summary": "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.",
    "evidence": "osv:CVE-2022-29248",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2022-29248",
      "aliases": [
        "BIT-drupal-2022-29248",
        "CVE-2022-29248",
        "DRUPAL-CORE-2022-010",
        "GHSA-cwmx-hcrq-mhc3"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/drupal/drupal",
              "type": "GIT",
              "events": [
                {
                  "introduced": "943ecef3c0bc9822338252a7df6419aeb9253c9d"
                },
                {
                  "fixed": "dddf4bdf8dd5c61d021bf88d42db73c7ccb59a60"
                },
                {
                  "introduced": "698ee686c23de8c97d7e0601cf745b220d54f4e1"
                },
                {
                  "fixed": "6acb839ece4f3275b748cc22d03a443b396a55e8"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "9.2.0"
                      },
                      {
                        "fixed": "9.2.20"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:drupal:drupal:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "9.3.0"
                      },
                      {
                        "fixed": "9.3.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            },
            {
              "repo": "https://github.com/guzzle/guzzle",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "f092dd734083473658de3ee4bef093ed77d2689c"
                },
                {
                  "introduced": "414c24961042f6616fb43e23fa69a785f9fc053e"
                },
                {
                  "fixed": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:guzzlephp:guzzle:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "6.5.6"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:guzzlephp:guzzle:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "7.0.0"
                      },
                      {
                        "fixed": "7.4.3"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "74a8602c6faec9ef74b7a9391ac82c5e65b1cdab"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "9.2.19",
            "9.3.13",
            "9.2.17",
            "9.3.11",
            "9.3.10",
            "9.2.14",
            "9.3.7",
            "9.3.4",
            "9.2.10",
            "9.3.2",
            "9.3.0",
            "9.2.8",
            "9.2.7",
            "9.2.5",
            "9.2.3",
            "9.2.1",
            "9.2.0",
            "7.4.2",
            "7.4.1",
            "7.4.0",
            "7.3.0",
            "7.2.0",
            "7.1.1",
            "7.1.0",
            "6.5.5",
            "7.0.0",
            "6.5.4",
            "6.5.3",
            "6.5.2",
            "6.5.1",
            "6.5.0",
            "6.4.1",
            "6.4.0",
            "6.3.3",
            "6.3.2",
            "6.3.1",
            "6.3.0",
            "6.2.2",
            "6.2.1",
            "4.2.3",
            "6.2.0",
            "6.1.1",
            "6.1.0",
            "6.0.2",
            "6.0.1",
            "6.0.0",
            "5.3.0",
            "5.2.0",
            "5.1.0",
            "5.0.3",
            "5.0.2",
            "5.0.1",
            "5.0.0",
            "4.2.2",
            "4.2.1",
            "4.2.0",
            "4.1.8",
            "4.1.7",
            "4.1.6",
            "4.1.5",
            "4.1.4",
            "4.1.3",
            "4.1.2",
            "4.1.1",
            "4.1.0",
            "4.0.2",
            "4.0.1",
            "4.0.0",
            "4.0.0-rc.2",
            "4.0.0-rc.1",
            "v3.8.1",
            "v3.8.0",
            "v3.7.4",
            "v3.7.3",
            "v3.7.2",
            "v3.7.1",
            "v3.7.0",
            "v3.6.0",
            "v3.5.0",
            "v3.4.3",
            "v3.4.2",
            "v3.4.1",
            "v3.4.0",
            "v3.3.1",
            "v3.3.0",
            "v3.2.0",
            "v3.1.2",
            "v3.1.1",
            "v3.1.0",
            "v3.0.7",
            "v3.0.6",
            "v3.0.5",
            "v3.0.4",
            "v3.0.3",
            "v3.0.2",
            "v3.0.1",
            "v3.0.0",
            "v2.8.8",
            "v2.8.7",
            "v2.8.6",
            "v2.8.5",
            "v2.8.4",
            "v2.8.3",
            "v2.8.2",
            "v2.8.1",
            "v2.8.0",
            "v2.7.2",
            "v2.7.1",
            "v2.7.0",
            "v2.6.6",
            "v2.6.5",
            "v2.6.4",
            "v2.6.3",
            "v2.6.2",
            "v2.6.1",
            "v2.6.0",
            "v2.5.0",
            "v2.4.1",
            "v2.4.0",
            "v2.3.2",
            "v2.3.1",
            "v2.3.0",
            "v2.2.4",
            "v2.2.3",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v2.1.4",
            "v2.1.3",
            "v2.1.2",
            "v2.1.1",
            "v2.1.0",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.0.3",
            "v1.0.2",
            "v1.0.1",
            "v1.0.0",
            "v1.0.0beta1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-29248.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:44.537780392Z",
      "provider": "osv",
      "references": [
        "https://www.drupal.org/sa-core-2022-010",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29248.json",
        "https://github.com/guzzle/guzzle/security/advisories/GHSA-cwmx-hcrq-mhc3",
        "https://nvd.nist.gov/vuln/detail/CVE-2022-29248",
        "https://www.debian.org/security/2022/dsa-5246",
        "https://github.com/guzzle/guzzle/commit/74a8602c6faec9ef74b7a9391ac82c5e65b1cdab",
        "https://github.com/guzzle/guzzle/pull/3018"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-200"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/29xxx/CVE-2022-29248.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2022-29248",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 512526,
  "published_at": "2022-05-25T00:00:00+00:00"
}