// For flags

CVE-2022-31090

CURLOPT_HTTPAUTH option not cleared on change of origin in Guzzle

Severity Score

7.7
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

Guzzle, an extensible PHP HTTP client. `Authorization` headers on requests are sensitive information. In affected versions 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 (change in host, scheme or port), if we choose to follow it, we should remove the `CURLOPT_HTTPAUTH` option before continuing, stopping curl from appending the `Authorization` header to the new request. 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. 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 steam handler backend, rather than curl.

Guzzle, un cliente PHP HTTP extensible. Los encabezados "Authorization" en las peticiones son información confidencial. En las versiones afectadas cuando es usado nuestro manejador Curl, es posible usar la opción "CURLOPT_HTTPAUTH" para especificar un encabezado "Authorization". Al realizar una petición que responda con un redireccionamiento a una URI con un origen diferente (cambio de host, esquema o puerto), si decidimos seguirla, debemos eliminar la opción "CURLOPT_HTTPAUTH" antes de continuar, impidiendo que curl añada el encabezado "Authorization" a la nueva petición. Los usuarios de Guzzle 7 afectados deben actualizar a Guzzle versión 7.4.5 lo antes posible. Los usuarios afectados que usen cualquier serie anterior de Guzzle deberían actualizar a Guzzle versiones 6.5.8 o 7.4.5. Tenga en cuenta que en Guzzle versión 7.4.2 fué implementada una corrección parcial, en la que un cambio de host desencadenaba una eliminación del encabezado de autorización añadida por curl, sin embargo esta corrección anterior no cubría el cambio de esquema o el cambio de puerto. Si no necesita o espera que sean seguidos los redireccionamientos, simplemente debería deshabilítalos todos. Alternativamente, puede especificarse el uso del backend de Guzzle steam handler, en lugar de curl

Guzzle, an extensible PHP HTTP client. `Authorization` headers on requests are sensitive information. In affected versions 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 (change in host, scheme or port), if we choose to follow it, we should remove the `CURLOPT_HTTPAUTH` option before continuing, stopping curl from appending the `Authorization` header to the new request. 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. 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 steam handler backend, rather than curl. *Please note that while some WordPress plugins and themes may use this as a dependency, they may not be directly exploitable.

*Credits: N/A
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
None
Availability
None
Attack Vector
Network
Attack Complexity
Low
Authentication
Single
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-20 CVE Published
  • 2024-08-03 CVE Updated
  • 2024-09-18 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.8
Search vendor "Guzzlephp" for product "Guzzle" and version " < 6.5.8"
-
Affected
Guzzlephp
Search vendor "Guzzlephp"
Guzzle
Search vendor "Guzzlephp" for product "Guzzle"
>= 7.0.0 < 7.4.5
Search vendor "Guzzlephp" for product "Guzzle" and version " >= 7.0.0 < 7.4.5"
-
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