CVE-2022-31042

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

HIGH
7.5
CVSS Score
Published: June 9, 2022 at 12:00 AM UTC
Updated: June 17, 2026 at 04:44 AM UTC
4 products affected across 4 vendorsDebian LinuxDrupalGuzzle

Using guzzle by guzzle?

Get instant alerts when new vulnerabilities affect guzzle - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 2%
SSVC
No known exploit

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

9.2.0 ≤ v < 9.2.219.3.0 ≤ v < 9.3.169.4.0 alpha19.4.0 beta19.4.0 rc1
Affected range stops below 9.2.21, so it looks safe — our inference, not a vendor statement
Affected range stops below 9.3.16, so it looks safe — our inference, not a vendor statement
v < 6.5.77.0.0 ≤ v < 7.4.4
Affected range stops below 6.5.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 7.4.4, so it looks safe — our inference, not a vendor statement
v < 6.5.7v < 7.4.4
Affected range stops below 6.5.7, so it looks safe — our inference, not a vendor statement
Affected range stops below 7.4.4, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGHGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-200CWE-212

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card