🛡️ CVE-2022-31042 — debian-linux

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-200 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

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

Impact

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.

Patches

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.

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](https://www.rfc-editor.org/rfc/rfc9110.html#name-redirection-3xx)

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](https://php-http.slack.com/). Do not report additional security advisories in that public channel, however - please follow our [vulnerability reporting process](https://github.com/guzzle/guzzle/security/policy).

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality high, integrity none, availability none.

Weakness class

CVE-2022-31042 is classified as CWE-200: Exposure of Sensitive Information. Information that should stay internal is disclosed to someone who is not authorised to see it.

Affected software

CVE-2022-31042 is recorded against 5 packages.

  • debian-linux
  • drupal
  • drupal/core (from 9.3.0 up to 9.3.16)
  • guzzle (from 7.0.0 up to 7.4.4)
  • guzzlehttp/guzzle (from 7.0.0 up to 7.4.4)

Timeline and source

Published on 10 June 2022 and last revised on 17 June 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

github.com
github.com
www.debian.org
www.drupal.org
www.rfc-editor.org
github.com
github.com
www.debian.org
www.drupal.org
www.rfc-editor.org

CVE-2022-31042 on other distributions

Each distribution ships its own build and its own fixed version. Pick the one you run:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
CWE CWE-200
Public Exploit ✅ No
Source NVD
Published 2022-06-10
Updated 2026-08-12
Modified 2026-06-17

Affected Packages

Software From version Fixed in
debian-linux
drupal
drupal/core 9.3.0 9.3.16
guzzle 7.0.0 7.4.4
guzzlehttp/guzzle 7.0.0 7.4.4

References

Patch, Third Party Advisory https://www.drupal.org/sa-core-2022-011
Patch, Third Party Advisory https://www.drupal.org/sa-core-2022-011

Similar Threats

Site Security Check

Is debian-linux part of your stack?

CVE-2022-31042 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2022