LiveActive security incident?Get immediate response
CVE Record

CVE-2022-31042: Failure to strip the Cookie header on change in host or HTTP downgrade in Guzzle

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.

HighCVSS 7.5Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Some PHP applications using Guzzle could unintentionally send manually added Cookie headers to the wrong place during redirects. That can expose session or authentication data if a redirect changes to another host or from HTTPS to HTTP.

Executive priority

Treat as a high-priority dependency update where Guzzle handles authenticated requests. The issue can leak sensitive cookies without user interaction, but sources do not indicate known active exploitation.

Technical view

Affected Guzzle versions did not always strip manually supplied Cookie headers when following redirects to a different host or an HTTP downgrade. Middleware-managed cookies were handled safely, but explicit Cookie headers could be forwarded. Fixed releases are 6.5.7 and 7.4.4.

Likely exposure

Exposure is most likely in PHP applications using guzzlehttp/guzzle before 6.5.7, or Guzzle 7 before 7.4.4, that manually set Cookie headers and allow redirects, especially to external or less trusted services.

Exploitation context

The source bundle does not show KEV listing or active exploitation. Abuse depends on an affected client following a redirect while a sensitive manual Cookie header is present. The impact is confidentiality loss, not integrity or availability.

Researcher notes

Focus review on explicit Cookie headers, redirect-following behavior, host changes, and HTTPS-to-HTTP downgrade cases. Do not assume all Guzzle cookie handling is vulnerable; the advisory distinguishes manual headers from cookie middleware behavior.

Mitigation direction

  • Upgrade Guzzle 7 deployments to 7.4.4 or later.
  • Upgrade older Guzzle series to 6.5.7, or migrate to 7.4.4 or later.
  • Disable redirects where application flows do not require them.
  • If unable to upgrade, use vendor-guided custom redirect middleware.
  • Review downstream advisories for Drupal and Debian-managed packages.

Validation and detection

  • Check Composer manifests and lockfiles for guzzlehttp/guzzle versions.
  • Identify code paths that manually set Cookie headers on Guzzle requests.
  • Confirm redirect handling is disabled or uses a fixed Guzzle release.
  • Review dependency scanners for CVE-2022-31042 findings.
  • Verify platform packages include Drupal or Debian security updates where relevant.
Prepared
Confidence
high
Sources
6

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-200: Information exposure and cloud metadata lookup

Information exposure and SSRF weaknesses can make discovery, cloud metadata, and credential material review relevant. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2022-31042 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.5 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.5CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N3.93.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

7.5High
CVSS 3.1 vector shape for CVE-2022-31042Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
guzzleguzzle< 6.5.7, >=7.0.0, < 7.4.4Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-200 · source CWE mapping

Exposure of Sensitive Information to an Unauthorized Actor

Exposure of Sensitive Information to an Unauthorized Actor represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.