# CVE-2022-31090: CURLOPT_HTTPAUTH option not cleared on change of origin in Guzzle

- Severity: High 7.7 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.92%, higher than 80% of CVEs (2026-12-01)
- Published: 2022-06-21T16:57:10.000Z
- Modified: 2026-06-17T04:44:46.550Z
- Also known as: GHSA-25mq-v84q-4j7r
- Weaknesses: CWE-200, CWE-212
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- guzzle guzzle: < 6.5.8; >=7.0.0, < 7.4.5
- guzzlehttp/guzzle (Packagist): before 6.5.8; from 7.0.0 before 7.4.5
- guzzlephp guzzle: before 6.5.8; from 7.0.0 before 7.4.5
- debian debian_linux: 11.0

## Every score

- GitHub_M: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:P/I:N/A:N`

## References

- <https://github.com/guzzle/guzzle/security/advisories/GHSA-25mq-v84q-4j7r> (mitigation, third-party-advisory, web)
- <https://github.com/guzzle/guzzle/commit/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82> (patch, third-party-advisory, web)
- <https://www.debian.org/security/2022/dsa-5246> (third-party-advisory, vendor-advisory, web)
- <https://security.gentoo.org/glsa/202305-24> (third-party-advisory, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31090> (advisory)
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/guzzle/CVE-2022-31090.yaml> (web)
- <https://github.com/guzzle/guzzle> (package)
- <https://github.com/guzzle/guzzle/blob/6.5.8/CHANGELOG.md> (web)
- <https://github.com/guzzle/guzzle/blob/7.4.5/CHANGELOG.md> (web)

## Sources

- CVE List: [CVE-2022-31090](https://www.cve.org/CVERecord?id=CVE-2022-31090), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-25mq-v84q-4j7r](https://github.com/advisories/GHSA-25mq-v84q-4j7r), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2022-31090](https://nvd.nist.gov/vuln/detail/CVE-2022-31090), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-31090 · Whole record: https://cve.day/CVE-2022-31090.json · Rebuilt by cve.day 2026-11-25T22:58:12.598Z
