CVE-2022-31043
PHP vulnerability analysis and mitigation

Overview

CVE-2022-31043 affects Guzzle, an open source PHP HTTP client. The vulnerability was discovered in June 2022 and involves the improper handling of Authorization headers during HTTPS to HTTP downgrades. In affected versions (Guzzle versions < 6.5.7 and < 7.4.4), when making a request using HTTPS scheme to a server that responds with a redirect to an HTTP scheme URI, the Authorization header was not properly removed from the forwarded request (GitHub Advisory).

Technical details

The vulnerability stems from a security flaw in the redirect handling mechanism. Prior to the fix, while Guzzle would remove the Authorization header when the host changed during a redirect, it failed to do so during HTTPS to HTTP downgrades. The vulnerability has a CVSS score of 7.5 (High) with the vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N, indicating network accessibility, low attack complexity, no privileges required, no user interaction needed, and potential for high confidentiality impact (SecMaster).

Impact

The vulnerability could allow remote attackers to gain access to sensitive information through the exposure of Authorization headers. This is particularly concerning when requests are downgraded from HTTPS to HTTP, as the Authorization header containing sensitive authentication credentials could be exposed to unauthorized parties (GitHub Advisory).

Mitigation and workarounds

Users of Guzzle 7 should upgrade to version 7.4.4, while users of earlier versions should upgrade to either version 6.5.7 or 7.4.4. For users unable to upgrade, alternative approaches include using their own redirect middleware or disabling redirects altogether if they are not required. The vulnerability has also been addressed in various dependent systems, such as Drupal versions 9.2.21, 9.3.16, and 9.4.0-rc2 (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-65346CRITICAL9.1
  • PHPPHP
  • alexusmai/laravel-file-manager
NoNoDec 04, 2025
CVE-2025-66468HIGH7.6
  • PHPPHP
  • aimeos/ai-cms-grapesjs
NoYesDec 02, 2025
CVE-2025-65345MEDIUM6.5
  • PHPPHP
  • alexusmai/laravel-file-manager
NoNoDec 03, 2025
CVE-2025-65657MEDIUM6.5
  • PHPPHP
  • feehi/cms
NoNoDec 02, 2025
CVE-2025-65186MEDIUM6.1
  • PHPPHP
  • getgrav/grav
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management