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

Published Jun 20, 2022
·
Updated

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

14 affected componentsFixes available
composer/guzzlehttp/guzzle>=7, <7.4.5, >=4, <6.5.8
Guzzlephp Guzzle<6.5.8
Guzzlephp Guzzle>=7.0.0<7.4.5
Debian Debian Linux=11.0
composer/guzzlehttp/guzzle>=7, <7.4.5
7.4.5
composer/guzzlehttp/guzzle>=4, <6.5.8
6.5.8
debian/guzzle<7.4.5-1
7.4.5-1
debian/guzzle<7.4.5-1
7.4.5-1
debian/guzzle<7.4.5-1
7.4.5-1
debian/mediawiki<1:1.35.7-1
1:1.35.7-1
debian/mediawiki<1:1.35.7-1
1:1.35.7-1
debian/mediawiki<1:1.35.7-1
1:1.35.7-1
debian/guzzle
7.4.5-17.9.2-0.18.3.1-3
debian/mediawiki
1:1.39.17-1+deb12u21:1.43.9+dfsg-1~deb13u11:1.43.11+dfsg-3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/guzzlehttp/guzzle to a version that resolves this vulnerability.

    Fixed in 7.4.5
  2. Upgrade

    Upgrade composer/guzzlehttp/guzzle to a version that resolves this vulnerability.

    Fixed in 6.5.8
  3. Upgrade

    Upgrade debian/guzzle to a version that resolves this vulnerability.

    Fixed in 7.4.5-1
  4. Upgrade

    Upgrade debian/mediawiki to a version that resolves this vulnerability.

    Fixed in 1:1.35.7-1
  5. Upgrade

    Upgrade debian/guzzle to a version that resolves this vulnerability.

    Fixed in 7.4.5-1Fixed in 7.9.2-0.1Fixed in 8.3.1-3
  6. Upgrade

    Upgrade debian/mediawiki to a version that resolves this vulnerability.

    Fixed in 1:1.39.17-1+deb12u2Fixed in 1:1.43.9+dfsg-1~deb13u1Fixed in 1:1.43.11+dfsg-3
  7. Upgrade

    Upgrade Guzzle to a version that resolves this vulnerability.

    Fixed in 7.4.5
  8. Upgrade

    Upgrade Guzzle to a version that resolves this vulnerability.

    Fixed in 6.5.8
  9. Configuration

    Disable redirects if redirects are not required or expected to be followed.

    Guzzle redirects = disabled
  10. Compensating control

    Use your own redirect middleware instead of Guzzle's redirect middleware if you are unable to upgrade.

Event History

Jun 20, 2022
Advisory Published
via Packagist·10:16 PM
Data Sourced
via Packagist·10:16 PM
DescriptionSeverityAffected Software
Advisory Published
10:24 PM
Jun 27, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via OSV·10:15 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

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.

2

What is the severity of CVE-2022-31091?

The severity of CVE-2022-31091 is high with a CVSS score of 7.7.

3

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.

4

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203