🛡️ CVE-2022-31042 — debian-linux
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
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
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
Similar Threats
- Critical CVE-2022-0194
- High CVE-2022-0367
- Medium CVE-2022-0171
- High CVE-2022-0135
- High CVE-2022-0204
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.