// For flags

CVE-2022-31042

Failure to strip the Cookie header on change in host or HTTP downgrade in Guzzle

Severity Score

7.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
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

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
Low
Authentication
None
Confidentiality
Partial
Integrity
None
Availability
None
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
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
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