CVE-2022-31090
CURLOPT_HTTPAUTH option not cleared on change of origin in Guzzle
Severity Score
Exploit Likelihood
Affected Versions
Public Exploits
0Exploited in Wild
-Decision
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.
CVSS Scores
SSVC
- Decision:-
Timeline
- 2022-05-18 CVE Reserved
- 2022-06-20 CVE Published
- 2024-08-03 CVE Updated
- 2024-10-28 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 (4)
URL | Tag | Source |
---|---|---|
https://github.com/guzzle/guzzle/security/advisories/GHSA-25mq-v84q-4j7r | Mitigation |
URL | Date | SRC |
---|
URL | Date | SRC |
---|---|---|
https://github.com/guzzle/guzzle/commit/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82 | 2023-07-24 |
URL | Date | SRC |
---|---|---|
https://security.gentoo.org/glsa/202305-24 | 2023-07-24 | |
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.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
|