CVE-2022-31091 json
Change in port should be considered a change in origin in Guzzle
published 2022-06-21 4 y ago modified 2026-06-17 4 mo ago also GHSA-q559-8m2m-g699 , EUVD-2022-6123
- cvss
- 7.7
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.6%
- EPSS 1.6% chance of exploitation in 30 days, percentile 75%
- public exploits
- 0
- none known
Summary
Guzzle, an extensible PHP HTTP client. `Authorization` and `Cookie` headers on requests are sensitive information. In affected versions on making a request which responds with a redirect to a URI with a different port, if we choose to follow it, we should remove the `Authorization` and `Cookie` headers from the request, before containing. Previously, we would only consider a change in host or scheme. Affected Guzzle 7 users should upgrade to Guzzle 7.4.5 as soon as possible. Affected users using any earlier series of Guzzle should upgrade to Guzzle 6.5.8 or 7.4.5. Note that a partial fix was implemented in Guzzle 7.4.2, where a change in host would trigger removal of the curl-added Authorization header, however this earlier fix did not cover change in scheme or change in port. An alternative approach would be to use your own redirect middleware, rather than ours, if you are unable to upgrade. 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.8, 7.4.5
- guzzlephp guzzle 6.5.8, 7.4.5
- guzzle Debian 14, Debian 13, Debian 12 7.4.5-1
- mediawiki Debian 14, Debian 13, Debian 12 1:1.35.7-1
debian advisories DEBIAN-CVE-2022-31091
- mediawiki Arch Linux 1.38.3-1
arch linux advisories AVG-2823
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-31091 updated cvss 7.7
php-guzzlehttp-guzzle: Change in port should be considered a change in origin
-
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
- no
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
1.57% chance of exploitation in the next 30 days, higher than 75% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
| NVD | 3.1 | 7.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
| NVD | 2.0 | 4.0 | AV:N/AC:L/Au:S/C:P/I:N/A:N |
| GitHub | 3.1 | 7.7 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| packagist | guzzlehttp/guzzle | <6.5.8 >=7.0.0, <7.4.5 |
6.5.8 7.4.5 |
Affected products
- guzzle guzzle
Classification
- Weakness
-
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
References
-
github.com
/guzzle/guzzle/commit/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82
web, patch, third-party-advisory
-
debian.org
/security/2022/dsa-5246
vendor-advisory, web, third-party-advisory
-
security.gentoo.org
/glsa/202305-24
vendor-advisory, web
-
github.com
/guzzle/guzzle/security/advisories/GHSA-q559-8m2m-g699
web, mitigation, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2022-31091
advisory
-
github.com
/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/guzzle/CVE-2022-31091.yaml
web
-
github.com
/guzzle/guzzle
package
Sources
- CVE List CVE-2022-31091
- GitHub Advisory GHSA-q559-8m2m-g699
- NVD CVE-2022-31091
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.