guzzle: Reliance on Cookies without Validation and Integrity Checking
CVE-2022-29248 is a high-severity reliance on cookies without validation and integrity checking vulnerability in guzzle, with a CVSS 3.1 base score of 8.1 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. Affected guzzle versions: < 6.5.6; >= 7.0.0, < 7.4.3. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.35% chance of exploitation within 30 days, higher than 72% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Drupal to 9.2.20 or 9.3.14, whichever matches your release line, or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Guzzle | guzzle | < 6.5.6; >= 7.0.0, < 7.4.3 | Not stated |
| Drupal | Drupal | 9.2.0 up to, but not including, 9.2.20; 9.3.0 up to, but not including, 9.3.14 | 9.2.20, 9.3.14 |
| Debian | Debian Linux | 11.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.0 | High | CNA (github.com) |
| CVSS 3.1 | 8.1 | High | NVD |
| CVSS 2.0 | 5.8 | Medium | NVD |
Official description
Guzzle is a PHP HTTP client. Guzzle prior to versions 6.5.6 and 7.4.3 contains a vulnerability with the cookie middleware. The vulnerability is that it is not checked if the cookie domain equals the domain of the server which sets the cookie via the Set-Cookie header, allowing a malicious server to set cookies for unrelated domains. The cookie middleware is disabled by default, so most library consumers will not be affected by this issue. Only those who manually add the cookie middleware to the handler stack or construct the client with ['cookies' => true] are affected. Moreover, those who do not use the same Guzzle client to call multiple domains and have disabled redirect forwarding are not affected by this vulnerability. Guzzle versions 6.5.6 and 7.4.3 contain a patch for this issue. As a workaround, turn off the cookie middleware.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Reliance on Cookies without Validation and Integrity Checking
The product relies on the existence or values of cookies when performing security-critical operations, but it does not properly ensure that the setting is valid for the associated user.
How developers prevent this class of flaw
- Avoid using cookie data for a security-related decision.
- Perform thorough input validation (i.e.: server side validation) on the cookie data if you're going to use it for a security related decision.
- Add integrity checks to detect tampering.
More Reliance on Cookies without Validation and Integrity Checking vulnerabilities (CWE-565)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/guzzle/guzzle/security/advisories/GHSA-cwmx-hcrq-mhc3Third Party Advisory
Patches and release notes
- github.com/guzzle/guzzle/commit/74a8602c6faec9ef74b7a9391ac82c5e65b1cdabThird Party Advisory
- github.com/guzzle/guzzle/pull/3018Issue Tracking, Third Party Advisory
- drupal.org/sa-core-2022-010Third Party Advisory
Third-party and government advisories
- debian.org/security/2022/dsa-5246Third Party Advisory
Other vulnerabilities in guzzle
- 7.2 High severity
- 7.7 High severity
- 7.7 High severity
- 7.5 High severity
- 7.5 High severity
Recent Reliance on Cookies without Validation and Integrity Checking vulnerabilities
- 9.1 Critical severity
- 7.2 High severity
Spotted an error? Tell us.