Vulnerability · Published Dec 5, 2022 · Assigned by hackerone
CVE-2022-32221
Critical 9.8
In plain English
A critical-severity information exposure in https://github.com/curl/curl. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 5.1% (higher than 92% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
When doing HTTP(S) transfers, libcurl might erroneously use the read callback (`CURLOPT_READFUNCTION`) to ask for data to send, even when the `CURLOPT_POSTFIELDS` option has been set, if the same handle previously was used to issue a `PUT` request which used that callback. This flaw may surprise the application and cause it to misbehave and either send off the wrong data or use memory after free or similar in the subsequent `POST` request. The problem exists in the logic for a reused handle when it is changed from a PUT to a POST.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:9 | curl | 7.76.1-19.el9_1.1 | ALSA-2023:0333 |
| AlmaLinux:9 | curl-minimal | 7.76.1-19.el9_1.1 | ALSA-2023:0333 |
| AlmaLinux:9 | libcurl | 7.76.1-19.el9_1.1 | ALSA-2023:0333 |
| AlmaLinux:9 | libcurl-devel | 7.76.1-19.el9_1.1 | ALSA-2023:0333 |
| AlmaLinux:9 | libcurl-minimal | 7.76.1-19.el9_1.1 | ALSA-2023:0333 |
| Alpine:v3.20 | curl | 7.86.0-r0 | ALPINE-CVE-2022-32221 |
| Alpine:v3.21 | curl | 7.86.0-r0 | ALPINE-CVE-2022-32221 |
| Alpine:v3.22 | curl | 7.86.0-r0 | ALPINE-CVE-2022-32221 |
| Alpine:v3.23 | curl | 7.86.0-r0 | ALPINE-CVE-2022-32221 |
| Alpine:v3.24 | curl | 7.86.0-r0 | ALPINE-CVE-2022-32221 |
| Debian:12 | curl | 7.86.0-1 | DEBIAN-CVE-2022-32221 |
| Debian:13 | curl | 7.86.0-1 | DEBIAN-CVE-2022-32221 |
| Debian:14 | curl | 7.86.0-1 | DEBIAN-CVE-2022-32221 |
| Rocky Linux:9 | curl | 0:7.76.1-19.el9_1.1 | RLSA-2023:0333 |
| Ubuntu:22.04:LTS | curl | 7.81.0-1ubuntu1.6 | UBUNTU-CVE-2022-32221 |
| Ubuntu:22.04:LTS | curl | 7.81.0-1ubuntu1.6 | USN-5702-1 |
| Ubuntu:22.04:LTS | mysql-8.0 | 8.0.32-0buntu0.22.04.1 | USN-5823-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | https://github.com/curl/curl | Fixed in 7.86.0 |
Weakness: CWE-200 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://hackerone.com/reports/1704017
- GLSA-202212-01 vendor-advisory
- https://security.netapp.com/advisory/ntap-20230110-0006/
- https://support.apple.com/kb/HT213604
- https://support.apple.com/kb/HT213605
- 20230123 APPLE-SA-2023-01-23-5 macOS Monterey 12.6.3 mailing-list
- 20230123 APPLE-SA-2023-01-23-4 macOS Ventura 13.2 mailing-list
- DSA-5330 vendor-advisory
- [debian-lts-announce] 20230128 [SECURITY] [DLA 3288-1] curl security update mailing-list
- https://security.netapp.com/advisory/ntap-20230208-0002/
- [oss-security] 20230517 curl: CVE-2023-28322: more POST-after-PUT confusion mailing-list
- https://cert-portal.siemens.com/productcert/html/ssa-892048.html
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html