CVE-2022-31091: Change in port should be considered a change in origin in Guzzle
Change in port should be considered a change in origin
Other sources
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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2022-31091?
CVE-2022-31091 is a vulnerability in Guzzle, an extensible PHP HTTP client, that allows sensitive information leakage when making requests with redirect to a URI with a different port.
What is the severity of CVE-2022-31091?
The severity of CVE-2022-31091 is high with a CVSS score of 7.7.
How does CVE-2022-31091 affect Guzzle?
CVE-2022-31091 affects Guzzle versions 4.x up to and including 6.5.8, and Guzzle versions 7.x up to and including 7.4.5.
What is the remedy for CVE-2022-31091 on Debian Linux?
The remedy for CVE-2022-31091 on Debian Linux is to update the package 'mediawiki' to versions 1:1.31.16-1+deb10u2, 1:1.31.16-1+deb10u6, 1:1.35.11-1~deb11u1, 1:1.35.13-1~deb11u1, 1:1.39.4-1~deb12u1, or 1:1.39.5-1~deb12u1.
How can I fix CVE-2022-31091 in Guzzle?
To fix CVE-2022-31091 in Guzzle, update the package to version 7.4.5-1.