Update dependency guzzlehttp/guzzle to v7.4.5 [SECURITY] #123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
7.3.0
->7.4.5
Warning
Some dependencies could not be looked up. Check the warning logs for more information.
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 atwww.example.com
might set a session cookie forapi.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-31043
Impact
Authorization
headers on requests are sensitive information. On making a request using thehttps
scheme to a server which responds with a redirect to a URI with thehttp
scheme, we should not forward theAuthorization
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
tohttp
downgrades did not result in theAuthorization
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-31042
Impact
Cookie
headers on requests are sensitive information. On making a request using thehttps
scheme to a server which responds with a redirect to a URI with thehttp
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 theCookie
header on. Prior to this fix, only cookies that were managed by our cookie middleware would be safely removed, and anyCookie
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-31090
Impact
Authorization
headers on requests are sensitive information. When using our Curl handler, it is possible to use theCURLOPT_HTTPAUTH
option to specify anAuthorization
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 theCURLOPT_HTTPAUTH
andCURLOPT_USERPWD
options before continuing, stopping curl from appending theAuthorization
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
andCookie
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 theAuthorization
andCookie
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
CURLOPT_HTTPAUTH
option not cleared on change of originv7.4.4
Compare Source
Fixed
v7.4.3
Compare Source
Fixed
v7.4.2
Compare Source
Fixed
force_ip_resolve
v7.4.1
Compare Source
Changed
symfony/deprecation-contracts
version 3 #2961Fixed
v7.4.0
Compare Source
Added
psr/log
version 2 and 3 #2943Fixed
restore_error_handler()
#2915InvalidArgumentException
when an incorrectheaders
array is provided #2916, #2942Changed
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.
This PR was generated by Mend Renovate. View the repository job log.