Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency guzzlehttp/guzzle to v7.4.5 [security] - autoclosed #34

Closed

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jun 18, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
guzzlehttp/guzzle (source) 7.0.1 -> 7.4.5 age adoption passing confidence

GitHub Vulnerability Alerts

CVE-2022-29248

Impact

Previous version of Guzzle contain a vulnerability with the cookie middleware. The vulnerability is that it is not checked if the cookie domain equals the domain of the server which sets the cookie via the Set-Cookie header, allowing a malicious server to set cookies for unrelated domains. For example an attacker at www.example.com might set a session cookie for api.example.net, logging the Guzzle client into their account and retrieving private API requests from the security log of their account.

Note that our cookie middleware is disabled by default, so most library consumers will not be affected by this issue. Only those who manually add the cookie middleware to the handler stack or construct the client with ['cookies' => true] are affected. Moreover, those who do not use the same Guzzle client to call multiple domains and have disabled redirect forwarding are not affected by this vulnerability.

Patches

Affected Guzzle 7 users should upgrade to Guzzle 7.4.3 as soon as possible. Affected users using any earlier series of Guzzle should upgrade to Guzzle 6.5.6 or 7.4.3.

Workarounds

If you do not need support for cookies, turn off the cookie middleware. It is already off by default, but if you have turned it on and no longer need it, turn it off.

References

For more information

If you have any questions or comments about this advisory, please get in touch with us in #guzzle on the PHP HTTP Slack. Do not report additional security advisories in that public channel, however - please follow our vulnerability reporting process.

CVE-2022-31042

Impact

Cookie headers on requests are sensitive information. On making a request using the https scheme to a server which responds with a redirect to a URI with the http scheme, or on making a request to a server which responds with a redirect to a a URI to a different host, we should not forward the Cookie header on. Prior to this fix, only cookies that were managed by our cookie middleware would be safely removed, and any Cookie header manually added to the initial request would not be stripped. We now always strip it, and allow the cookie middleware to re-add any cookies that it deems should be there.

Patches

Affected Guzzle 7 users should upgrade to Guzzle 7.4.4 as soon as possible. Affected users using any earlier series of Guzzle should upgrade to Guzzle 6.5.7 or 7.4.4.

Workarounds

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.

References

For more information

If you have any questions or comments about this advisory, please get in touch with us in #guzzle on the PHP HTTP Slack. Do not report additional security advisories in that public channel, however - please follow our vulnerability reporting process.

CVE-2022-31043

Impact

Authorization headers on requests are sensitive information. On making a request using the https scheme to a server which responds with a redirect to a URI with the http scheme, we should not forward the Authorization header on. This is much the same as to how we don't forward on the header if the host changes. Prior to this fix, https to http downgrades did not result in the Authorization header being removed, only changes to the host.

Patches

Affected Guzzle 7 users should upgrade to Guzzle 7.4.4 as soon as possible. Affected users using any earlier series of Guzzle should upgrade to Guzzle 6.5.7 or 7.4.4.

Workarounds

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.

References

For more information

If you have any questions or comments about this advisory, please get in touch with us in #guzzle on the PHP HTTP Slack. Do not report additional security advisories in that public channel, however - please follow our vulnerability reporting process.

CVE-2022-31090

Impact

Authorization headers on requests are sensitive information. When using our Curl handler, it is possible to use the CURLOPT_HTTPAUTH option to specify an Authorization header. On making a request which responds with a redirect to a URI with a different origin, if we choose to follow it, we should remove the CURLOPT_HTTPAUTH and CURLOPT_USERPWD options before continuing, stopping curl from appending the Authorization header to the new request. Previously, we would only consider a change in host. Now, we consider any change in host, port or scheme to be a change in origin.

Patches

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.

Workarounds

If you do not require or expect redirects to be followed, one should simply disable redirects all together. Alternatively, one can specify to use the Guzzle stream handler backend, rather than curl.

References

For more information

If you have any questions or comments about this advisory, please get in touch with us in #guzzle on the PHP HTTP Slack. Do not report additional security advisories in that public channel, however - please follow our vulnerability reporting process.

CVE-2022-31091

Impact

Authorization and Cookie headers on requests are sensitive information. 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 downgrade. Now, we consider any change in host, port or scheme to be a change in origin.

Patches

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.

Workarounds

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.

References

For more information

If you have any questions or comments about this advisory, please get in touch with us in #guzzle on the PHP HTTP Slack. Do not report additional security advisories in that public channel, however please follow our vulnerability reporting process.


Release Notes

guzzle/guzzle (guzzlehttp/guzzle)

v7.4.5

Compare Source

Fixed
  • Fix change in port should be considered a change in origin
  • Fix CURLOPT_HTTPAUTH option not cleared on change of origin

v7.4.4

Compare Source

Fixed
  • Fix failure to strip Authorization header on HTTP downgrade
  • Fix failure to strip the Cookie header on change in host or HTTP downgrade

v7.4.3

Compare Source

Fixed
  • Fix cross-domain cookie leakage

v7.4.2

Compare Source

Fixed
  • Remove curl auth on cross-domain redirects to align with the Authorization HTTP header
  • Reject non-HTTP schemes in StreamHandler
  • Set a default ssl.peer_name context in StreamHandler to allow force_ip_resolve

v7.4.1

Compare Source

Changed
  • Replaced implicit URI to string coercion #​2946
  • Allow symfony/deprecation-contracts version 3 #​2961
Fixed
  • Only close curl handle if it's done #​2950

v7.4.0

Compare Source

Added
Fixed
  • Make sure we always call restore_error_handler() #​2915
  • Fix progress parameter type compatibility between the cURL and stream handlers #​2936
  • Throw InvalidArgumentException when an incorrect headers array is provided #​2916, #​2942
Changed

v7.3.0

Compare Source

Added
  • Support for DER and P12 certificates #​2413
  • Support the cURL (http://) scheme for StreamHandler proxies #​2850
  • Support for guzzlehttp/psr7:^2.0 #​2878
Fixed
  • Handle exceptions on invalid header consistently between PHP versions and handlers #​2872

v7.2.0

Compare Source

Added
Fixed
  • Handle exceptions during response creation #​2591
  • Fix CURLOPT_ENCODING not to be overwritten #​2595
  • Make sure the Request always has a body object #​2804
Changed
  • The TooManyRedirectsException has a response #​2660
  • Avoid "functions" from dependencies #​2712
Deprecated
  • Using environment variable GUZZLE_CURL_SELECT_TIMEOUT #​2786

v7.1.1

Compare Source

Fixed
  • Incorrect EOF detection for response body streams on Windows.
Changed
  • We dont connect curl sink on HEAD requests.
  • Removed some PHP 5 workarounds

v7.1.0

Compare Source

Added
  • GuzzleHttp\MessageFormatterInterface
Fixed
  • Fixed issue that caused cookies with no value not to be stored.
  • On redirects, we allow all safe methods like GET, HEAD and OPTIONS.
  • Fixed logging on empty responses.
  • Make sure MessageFormatter::format returns string
Deprecated
  • All functions in GuzzleHttp has been deprecated. Use static methods on Utils instead.
  • ClientInterface::getConfig()
  • Client::getConfig()
  • Client::__call()
  • Utils::defaultCaBundle()
  • CurlFactory::LOW_CURL_VERSION_NUMBER

Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/packagist-guzzlehttp/guzzle-vulnerability branch from 2c17e81 to 1d9aeb0 Compare June 23, 2022 23:06
@renovate renovate bot changed the title fix(deps): update dependency guzzlehttp/guzzle to v7.4.4 [security] fix(deps): update dependency guzzlehttp/guzzle to v7.4.5 [security] Jun 23, 2022
@renovate renovate bot changed the title fix(deps): update dependency guzzlehttp/guzzle to v7.4.5 [security] fix(deps): update dependency guzzlehttp/guzzle to v7.4.5 [security] - autoclosed Aug 6, 2024
@renovate renovate bot closed this Aug 6, 2024
@renovate renovate bot deleted the renovate/packagist-guzzlehttp/guzzle-vulnerability branch August 6, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants