CVEfocus › CVE database › CVE-2022-31091

CVE-2022-31091Change in port should be considered a change in origin in Guzzle

CVSS 7.7 HighEPSS 1.6% (higher than 76% of CVEs)Published 2022-06-27Updated 2025-04-23Assigner: GitHub_M

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.

CWE-200

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

7Fixed
7Fix pending
6Under investigation
5Will not fix
5Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10icinga-php-thirdpartyFix pendingUBUNTU-CVE-2022-31091
Ubuntu 26.10icingaweb2-module-reactbundleFix pendingUBUNTU-CVE-2022-31091
Ubuntu 26.04guzzleNot affected
vulnerable_code_not_present
Ubuntu 26.04icinga-php-thirdpartyUnder investigationUBUNTU-CVE-2022-31091
Ubuntu 26.04icingaweb2-module-reactbundleUnder investigationUBUNTU-CVE-2022-31091
Ubuntu 26.04mediawikiNot affected
vulnerable_code_not_present
Ubuntu 25.10guzzleNot affected
vulnerable_code_not_present
Ubuntu 25.10icinga-php-thirdpartyWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-31091
Ubuntu 25.10icingaweb2-module-reactbundleWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-31091
Ubuntu 25.10mediawikiNot affected
vulnerable_code_not_present
Ubuntu 24.04guzzleNot affected
vulnerable_code_not_present
Ubuntu 24.04icinga-php-thirdpartyUnder investigationUBUNTU-CVE-2022-31091
Ubuntu 24.04icingaweb2-module-reactbundleUnder investigationUBUNTU-CVE-2022-31091
Ubuntu 22.04civicrmFix pendingUBUNTU-CVE-2022-31091
Ubuntu 22.04icinga-php-thirdpartyUnder investigationUBUNTU-CVE-2022-31091
Ubuntu 22.04icingaweb2-module-reactbundleUnder investigationUBUNTU-CVE-2022-31091
Ubuntu 22.04mediawikiFix pendingUBUNTU-CVE-2022-31091
Ubuntu 20.04civicrmFix pendingUBUNTU-CVE-2022-31091
Ubuntu 20.04mediawikiFix pendingUBUNTU-CVE-2022-31091
Ubuntu 18.04civicrmFix pendingUBUNTU-CVE-2022-31091
Ubuntu 18.04mediawikiWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-31091
Ubuntu 16.04civicrmWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2022-31091
Ubuntu 14.04mediawikiWill not fix
Ubuntu decided not to fix this in this release
Debian 14guzzleFixed7.4.5-1DEBIAN-CVE-2022-31091
Debian 14mediawikiFixed1:1.35.7-1DEBIAN-CVE-2022-31091
Debian 13guzzleFixed7.4.5-1DEBIAN-CVE-2022-31091
Debian 13mediawikiFixed1:1.35.7-1DEBIAN-CVE-2022-31091
Debian 12guzzleFixed7.4.5-1DEBIAN-CVE-2022-31091
Debian 12mediawikiFixed1:1.35.7-1DEBIAN-CVE-2022-31091
Packagist libraryguzzlehttp/guzzleFixed6.5.8GHSA-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.

Vendor advisories:

References

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.