guzzle: Improper Removal of Sensitive Information Before Storage or Transfer
CVE-2022-31090 is a high-severity improper removal of sensitive information before storage or transfer vulnerability in guzzle, with a CVSS 3.1 base score of 7.7 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected guzzle versions: < 6.5.8; >=7.0.0, < 7.4.5. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.92% chance of exploitation within 30 days, higher than 80% of scored CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of guzzle you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Guzzle | guzzle | < 6.5.8; >=7.0.0, < 7.4.5 | Not stated |
| 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
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- NoneNothing can be modified.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.7 | High | CNA (github.com) |
| CVSS 3.1 | 7.7 | High | NVD |
| CVSS 2.0 | 4.0 | Medium | NVD |
Official description
Guzzle, an extensible PHP HTTP client. `Authorization` headers on requests are sensitive information. In affected versions when using our Curl handler, it is possible to use the `CURLOPT_HTTPAUTH` option to specify an `Authorization` header. On making a request which responds with a redirect to a URI with a different origin (change in host, scheme or port), if we choose to follow it, we should remove the `CURLOPT_HTTPAUTH` option before continuing, stopping curl from appending the `Authorization` header to the new request. 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. Note that a partial fix was implemented in Guzzle 7.4.2, where a change in host would trigger removal of the curl-added Authorization header, however this earlier fix did not cover change in scheme or change in port. If you do not require or expect redirects to be followed, one should simply disable redirects all together. Alternatively, one can specify to use the Guzzle steam handler backend, rather than curl.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Removal of Sensitive Information Before Storage or Transfer
The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.
How developers prevent this class of flaw
- Clearly specify which information should be regarded as private or sensitive, and require that the product offers functionality that allows the user to cleanse the sensitive information from the resource before it is published or exported to other parties.
- Compartmentalize the system to have safe areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
- Use naming conventions and strong types to make it easier to spot when sensitive data is being used. When creating structures, objects, or other complex entities, separate the sensitive and non-sensitive data as much as possible.
More Improper Removal of Sensitive Information Before Storage or Transfer vulnerabilities (CWE-212)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- github.com/guzzle/guzzle/security/advisories/GHSA-25mq-v84q-4j7rMitigation, Third Party Advisory
Patches and release notes
- github.com/guzzle/guzzle/commit/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82Third Party Advisory
Third-party and government advisories
- security.gentoo.org/glsa/202305-24Third Party Advisory
- debian.org/security/2022/dsa-5246Third Party Advisory
Other vulnerabilities in guzzle
- 7.2 High severity
- 7.7 High severity
- 7.5 High severity
- 7.5 High severity
- 8.1 High severity
Recent Improper Removal of Sensitive Information Before Storage or Transfer vulnerabilities
- 7.5 High severity
- 8.8 High severity
- 7.5 High severity
Spotted an error? Tell us.