CVE-2022-31042 json
Failure to strip the Cookie header on change in host or HTTP downgrade in Guzzle
published 2022-06-09 4 y ago modified 2026-09-19 50 d ago also BIT-drupal-2022-31042 , BIT-drupal-2022-31043 , CVE-2022-31043 , DRUPAL-CORE-2022-011 , EUVD-2022-6032 , GHSA-f2wf-25xc-69c9 , GHSA-w248-ffj2-4v5q
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.0%
- EPSS 2.0% chance of exploitation in 30 days, percentile 80%
- public exploits
- 0
- none known
Summary
Guzzle is an open source PHP HTTP client. In affected versions the `Cookie` headers on requests are sensitive information. On making a request using the `https` scheme to a server which responds with a redirect to a URI with the `http` scheme, or on making a request to a server which responds with a redirect to a a URI to a different host, we should not forward the `Cookie` header on. Prior to this fix, only cookies that were managed by our cookie middleware would be safely removed, and any `Cookie` header manually added to the initial request would not be stripped. We now always strip it, and allow the cookie middleware to re-add any cookies that it deems should be there. Affected Guzzle 7 users should upgrade to Guzzle 7.4.4 as soon as possible. Affected users using any earlier series of Guzzle should upgrade to Guzzle 6.5.7 or 7.4.4. Users unable to upgrade may consider an alternative approach to use your own redirect middleware, rather than ours. If you do not require or expect redirects to be followed, one should simply disable redirects all together.
Patch / fix
- packagist guzzlehttp/guzzle 6.5.7, 7.4.4
- bitnami drupal 9.2.21, 9.3.16
- packagist drupal/core 9.2.21, 9.3.16
- guzzlephp guzzle 6.5.7, 7.4.4
- drupal drupal 9.2.21, 9.3.16
- guzzle Debian 14, Debian 13, Debian 12 7.4.4-1
- mediawiki Debian 14, Debian 13, Debian 12 1:1.35.7-1
debian advisories DEBIAN-CVE-2022-31042
- mediawiki Arch Linux 1.38.3-1
arch linux advisories AVG-2823
- github.com/guzzle/guzzle@e3ff079 commit
- drupal.org/sa-core-2022-011 advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2022-31042 updated cvss 7.5
php-guzzlehttp-guzzle: disclosure of sensitive information
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
1.99% chance of exploitation in the next 30 days, higher than 80% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | guzzlehttp/guzzle | >=4.0.0, <6.5.7 >=7.0.0, <7.4.4 |
6.5.7 7.4.4 |
| bitnami | drupal | >=9.2.0, <9.2.21 >=9.3.0, <9.3.16 |
9.2.21 9.3.16 |
| packagist | drupal/core | >=8.0.0, <9.2.21 >=9.3.0, <9.3.16 |
9.2.21 9.3.16 |
Affected products
- guzzle guzzle
Classification
References
-
github.com
/guzzle/guzzle/commit/e3ff079b22820c2029d4c2a87796b6a0b8716ad8
web, patch, third-party-advisory, advisory
-
drupal.org
/sa-core-2022-011
web, patch, third-party-advisory, advisory
-
debian.org
/security/2022/dsa-5246
vendor-advisory, web, third-party-advisory, advisory
-
github.com
/guzzle/guzzle/security/advisories/GHSA-f2wf-25xc-69c9
web, third-party-advisory, advisory
-
rfc-editor.org
/rfc/rfc9110.html#name-redirection-3xx
web, third-party-advisory, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-31042
advisory, web
-
github.com
/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/guzzle/CVE-2022-31042.yaml
web
-
github.com
/guzzle/guzzle
package
-
github.com
/guzzle/guzzle/security/advisories/GHSA-w248-ffj2-4v5q
web, advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-31043
advisory, web
-
github.com
/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/guzzle/CVE-2022-31043.yaml
web
Sources
- CVE List CVE-2022-31042
- GitHub Advisory GHSA-f2wf-25xc-69c9
- GitHub Advisory GHSA-w248-ffj2-4v5q
- NVD CVE-2022-31042
- OSV BIT-drupal-2022-31042
- OSV BIT-drupal-2022-31043
- OSV DRUPAL-CORE-2022-011
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.