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.

Severity (CVSS 3.1)9.8Critical
Exploit odds (30 days)5.1%top 7.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
AlmaLinux:9curl7.76.1-19.el9_1.1ALSA-2023:0333
AlmaLinux:9curl-minimal7.76.1-19.el9_1.1ALSA-2023:0333
AlmaLinux:9libcurl7.76.1-19.el9_1.1ALSA-2023:0333
AlmaLinux:9libcurl-devel7.76.1-19.el9_1.1ALSA-2023:0333
AlmaLinux:9libcurl-minimal7.76.1-19.el9_1.1ALSA-2023:0333
Alpine:v3.20curl7.86.0-r0ALPINE-CVE-2022-32221
Alpine:v3.21curl7.86.0-r0ALPINE-CVE-2022-32221
Alpine:v3.22curl7.86.0-r0ALPINE-CVE-2022-32221
Alpine:v3.23curl7.86.0-r0ALPINE-CVE-2022-32221
Alpine:v3.24curl7.86.0-r0ALPINE-CVE-2022-32221
Debian:12curl7.86.0-1DEBIAN-CVE-2022-32221
Debian:13curl7.86.0-1DEBIAN-CVE-2022-32221
Debian:14curl7.86.0-1DEBIAN-CVE-2022-32221
Rocky Linux:9curl0:7.76.1-19.el9_1.1RLSA-2023:0333
Ubuntu:22.04:LTScurl7.81.0-1ubuntu1.6UBUNTU-CVE-2022-32221
Ubuntu:22.04:LTScurl7.81.0-1ubuntu1.6USN-5702-1
Ubuntu:22.04:LTSmysql-8.08.0.32-0buntu0.22.04.1USN-5823-1

Affected products (as reported)

VendorProductVersions
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