CURLOPT_HTTPAUTH option not cleared on change of origin in Guzzle
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-200.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| guzzle | guzzle | before 6.5.8; 7.0.0 to before 7.4.5 | 6.5.8, 7.4.5 | Patch available | CNA |
| — | guzzlehttp/guzzle (Packagist) | before 6.5.8 | 6.5.8 | Patch available | GHSA-25mq-v84q-4j7r |
| — | guzzlehttp/guzzle (Packagist) | 7.0.0 to before 7.4.5 | 7.4.5 | Patch available | GHSA-25mq-v84q-4j7r |
- guzzle Vendorguzzle Affected before 6.5.8; 7.0.0 to before 7.4.5 Fixed in 6.5.8, 7.4.5 Patch available CNA
- guzzlehttp/guzzle (Packagist) Vendor— Affected before 6.5.8 Fixed in 6.5.8 Patch available GHSA-25mq-v84q-4j7r
- guzzlehttp/guzzle (Packagist) Vendor— Affected 7.0.0 to before 7.4.5 Fixed in 7.4.5 Patch available GHSA-25mq-v84q-4j7r
Remediation
- Fix · CNA guzzle (guzzle) Fixed in 6.5.8, 7.4.5
- Fix · GHSA-25mq-v84q-4j7r guzzlehttp/guzzle (Packagist) Fixed in 6.5.8 Advisory →
- Fix · GHSA-25mq-v84q-4j7r guzzlehttp/guzzle (Packagist) Fixed in 7.4.5 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2022-31090
- 2026-10-03 Alias added: GHSA-25mq-v84q-4j7r
References
Advisory 4
More Guzzle vulnerabilities
- TI-2022-13088 Fix failure to strip Authorization header on HTTP downgrade in Guzzle CVSS 3.1HIGH 7.5
- TI-2022-13087 Failure to strip the Cookie header on change in host or HTTP downgrade in Guzzle CVSS 3.1HIGH 7.5
- TI-2022-11789 Cross-domain cookie leakage in Guzzle CVSS 3.1HIGH 8.1
- TI-2022-13135 Change in port should be considered a change in origin in Guzzle CVSS 3.1HIGH 7.7
- TI-2026-40256 Guzzle: Dot-Only Cookie Domains Match All Hosts in guzzlehttp/guzzle CVSS 3.1MEDIUM 5.8
- TI-2026-42697 Guzzle: Cookie Disclosure and Injection via IP-Address Domains CVSS 3.1MEDIUM 6.1
Sources
- CVE-2022-31090 · CVE Program
- CVE-2022-31090 · NVD
- FIRST EPSS
- GHSA-25mq-v84q-4j7r · GitHub Advisory Database · CC BY 4.0
- CVE-2022-31090 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences