CVE-2022-31042
Failure to strip the Cookie header on change in host or HTTP downgrade in Guzzle
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
Descriptions
Guzzle is an open source PHP HTTP client. In affected versions the `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. 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. Users unable to upgrade may consider an alternative approach to use your own redirect middleware, rather than ours. If you do not require or expect redirects to be followed, one should simply disable redirects all together.
Guzzle es un cliente PHP HTTP de código abierto. En las versiones afectadas, los encabezados "Cookie" de las peticiones son información confidencial. Al hacer una petición usando el esquema "https" a un servidor que responde con un redireccionamiento a un URI con el esquema "http", o al hacer una petición a un servidor que responde con un redireccionamiento a un URI a un host diferente, no deberíamos reenviar el encabezado "Cookie". Antes de esta corrección, sólo las cookies administradas por nuestro middleware de cookies eran eliminadas de forma segura, y cualquier encabezado "Cookie" añadida manualmente a la petición inicial no era eliminada. Ahora siempre lo eliminamos, y permitimos que el middleware de cookies vuelva a añadir las cookies que considere que deben estar ahí. Los usuarios de Guzzle 7 afectados deben actualizar a Guzzle versión 7.4.4 lo antes posible. Los usuarios afectados usando cualquier serie anterior de Guzzle deberán actualizar a Guzzle versiones 6.5.7 o 7.4.4. Los usuarios que no puedan actualizar pueden considerar un enfoque alternativo para usar su propio middleware de redireccionamiento, en lugar del nuestro. Si no es requerido o no es esperado que sean seguidas los redireccionamientos, debería simplemente deshabilitar los redireccionamientos por completo
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-05-18 CVE Reserved
- 2022-06-09 CVE Published
- 2024-08-03 CVE Updated
- 2024-08-31 EPSS Updated
- ---------- Exploited in Wild
- ---------- KEV Due Date
- ---------- First Exploit
CWE
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
- CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer
CAPEC
References (5)
URL | Tag | Source |
---|---|---|
https://github.com/guzzle/guzzle/security/advisories/GHSA-f2wf-25xc-69c9 | Third Party Advisory | |
https://www.rfc-editor.org/rfc/rfc9110.html#name-redirection-3xx | Third Party Advisory |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/guzzle/guzzle/commit/e3ff079b22820c2029d4c2a87796b6a0b8716ad8 | 2023-07-24 | |
https://www.drupal.org/sa-core-2022-011 | 2023-07-24 |
URL | Date | SRC |
---|---|---|
https://www.debian.org/security/2022/dsa-5246 | 2023-07-24 |
Affected Vendors, Products, and Versions
Vendor | Product | Version | Other | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Vendor | Product | Version | Other | Status | <-- --> | Vendor | Product | Version | Other | Status |
Guzzlephp Search vendor "Guzzlephp" | Guzzle Search vendor "Guzzlephp" for product "Guzzle" | < 6.5.7 Search vendor "Guzzlephp" for product "Guzzle" and version " < 6.5.7" | - |
Affected
| ||||||
Guzzlephp Search vendor "Guzzlephp" | Guzzle Search vendor "Guzzlephp" for product "Guzzle" | >= 7.0.0 < 7.4.4 Search vendor "Guzzlephp" for product "Guzzle" and version " >= 7.0.0 < 7.4.4" | - |
Affected
| ||||||
Drupal Search vendor "Drupal" | Drupal Search vendor "Drupal" for product "Drupal" | >= 9.2.0 < 9.2.21 Search vendor "Drupal" for product "Drupal" and version " >= 9.2.0 < 9.2.21" | - |
Affected
| ||||||
Drupal Search vendor "Drupal" | Drupal Search vendor "Drupal" for product "Drupal" | >= 9.3.0 < 9.3.16 Search vendor "Drupal" for product "Drupal" and version " >= 9.3.0 < 9.3.16" | - |
Affected
| ||||||
Drupal Search vendor "Drupal" | Drupal Search vendor "Drupal" for product "Drupal" | 9.4.0 Search vendor "Drupal" for product "Drupal" and version "9.4.0" | alpha1 |
Affected
| ||||||
Drupal Search vendor "Drupal" | Drupal Search vendor "Drupal" for product "Drupal" | 9.4.0 Search vendor "Drupal" for product "Drupal" and version "9.4.0" | beta1 |
Affected
| ||||||
Drupal Search vendor "Drupal" | Drupal Search vendor "Drupal" for product "Drupal" | 9.4.0 Search vendor "Drupal" for product "Drupal" and version "9.4.0" | rc1 |
Affected
| ||||||
Debian Search vendor "Debian" | Debian Linux Search vendor "Debian" for product "Debian Linux" | 11.0 Search vendor "Debian" for product "Debian Linux" and version "11.0" | - |
Affected
|