CVE-2022-31091 is a high-severity security vulnerability in guzzlehttp/guzzle (composer), affecting versions < 6.5.8. It is fixed in 6.5.8, 7.4.5.
Impact Authorization and Cookie headers on requests are sensitive information. On making a request which responds with a redirect to a URI with a different port, if we choose to follow it, we should remove the Authorization and Cookie headers from the request, before containing. Previously, we would only consider a change in host or scheme downgrade. Now, we consider any change in host, port or scheme to be a change in origin. Patches 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. Workarounds An alternative approach would be to use your own redirect middleware, rather than ours, if you are unable to upgrade. If you do not require or expect redirects to be followed, one should simply disable redirects all together. References RFC9110 Section 15.4 CVE-2022-27776 For more information If you have any questions or comments about this advisory, please get in touch with us in #guzzle on the PHP HTTP Slack. Do not report additional security advisories in that public channel, however please follow our vulnerability reporting process.
CVE-2022-31091 has a CVSS score of 7.7 (High). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment.
A fixed version is available (6.5.8, 7.4.5). Upgrading removes the vulnerable code path.
composer
guzzlehttp/guzzle (< 6.5.8)guzzlehttp/guzzle (>= 7.0.0, < 7.4.5)guzzlehttp/guzzle → 6.5.8 (composer)guzzlehttp/guzzle → 7.4.5 (composer)Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter instead of chasing every advisory.
Kodem's runtime-powered SCA identifies whether CVE-2022-31091 is reachable in your applications. Explore open-source security for your team.
See if CVE-2022-31091 is reachable in your applications. Get a demo
Upgrade the following packages to resolve this vulnerability:
guzzlehttp/guzzle to 6.5.8 or laterguzzlehttp/guzzle to 7.4.5 or laterKodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
CVE-2022-31091 is a high-severity security vulnerability in guzzlehttp/guzzle (composer), affecting versions < 6.5.8. It is fixed in 6.5.8, 7.4.5.
CVE-2022-31091 has a CVSS score of 7.7 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
guzzlehttp/guzzle (composer) versions < 6.5.8 is affected.
Yes. CVE-2022-31091 is fixed in 6.5.8, 7.4.5. Upgrade to this version or later.
Whether CVE-2022-31091 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
guzzlehttp/guzzle to 6.5.8 or laterguzzlehttp/guzzle to 7.4.5 or later