CVE-2022-31091Change in port should be considered a change in origin in Guzzle
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.
What to do
Fixed builds are available from Debian, Packagist: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | icinga-php-thirdparty | Fix pending | UBUNTU-CVE-2022-31091 | |
| Ubuntu 26.10 | icingaweb2-module-reactbundle | Fix pending | UBUNTU-CVE-2022-31091 | |
| Ubuntu 26.04 | guzzle | Not affected vulnerable_code_not_present | ||
| Ubuntu 26.04 | icinga-php-thirdparty | Under investigation | UBUNTU-CVE-2022-31091 | |
| Ubuntu 26.04 | icingaweb2-module-reactbundle | Under investigation | UBUNTU-CVE-2022-31091 | |
| Ubuntu 26.04 | mediawiki | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | guzzle | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | icinga-php-thirdparty | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-31091 | |
| Ubuntu 25.10 | icingaweb2-module-reactbundle | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-31091 | |
| Ubuntu 25.10 | mediawiki | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | guzzle | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | icinga-php-thirdparty | Under investigation | UBUNTU-CVE-2022-31091 | |
| Ubuntu 24.04 | icingaweb2-module-reactbundle | Under investigation | UBUNTU-CVE-2022-31091 | |
| Ubuntu 22.04 | civicrm | Fix pending | UBUNTU-CVE-2022-31091 | |
| Ubuntu 22.04 | icinga-php-thirdparty | Under investigation | UBUNTU-CVE-2022-31091 | |
| Ubuntu 22.04 | icingaweb2-module-reactbundle | Under investigation | UBUNTU-CVE-2022-31091 | |
| Ubuntu 22.04 | mediawiki | Fix pending | UBUNTU-CVE-2022-31091 | |
| Ubuntu 20.04 | civicrm | Fix pending | UBUNTU-CVE-2022-31091 | |
| Ubuntu 20.04 | mediawiki | Fix pending | UBUNTU-CVE-2022-31091 | |
| Ubuntu 18.04 | civicrm | Fix pending | UBUNTU-CVE-2022-31091 | |
| Ubuntu 18.04 | mediawiki | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-31091 | |
| Ubuntu 16.04 | civicrm | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2022-31091 | |
| Ubuntu 14.04 | mediawiki | Will not fix Ubuntu decided not to fix this in this release | ||
| Debian 14 | guzzle | Fixed | 7.4.5-1 | DEBIAN-CVE-2022-31091 |
| Debian 14 | mediawiki | Fixed | 1:1.35.7-1 | DEBIAN-CVE-2022-31091 |
| Debian 13 | guzzle | Fixed | 7.4.5-1 | DEBIAN-CVE-2022-31091 |
| Debian 13 | mediawiki | Fixed | 1:1.35.7-1 | DEBIAN-CVE-2022-31091 |
| Debian 12 | guzzle | Fixed | 7.4.5-1 | DEBIAN-CVE-2022-31091 |
| Debian 12 | mediawiki | Fixed | 1:1.35.7-1 | DEBIAN-CVE-2022-31091 |
| Packagist library | guzzlehttp/guzzle | Fixed | 6.5.8 | GHSA-q559-8m2m-g699 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- guzzle: affected: < 6.5.8, >=7.0.0, < 7.4.5
Vendor advisories:
- https://www.debian.org/security/2022/dsa-5246 (vendor-advisory)
- https://security.gentoo.org/glsa/202305-24 (vendor-advisory)
References
- https://github.com/guzzle/guzzle/commit/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82
- https://github.com/guzzle/guzzle/security/advisories/GHSA-q559-8m2m-g699
- https://www.debian.org/security/2022/dsa-5246
- https://security.gentoo.org/glsa/202305-24
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.