CVE-2022-32221
JSON

9.8critical

POST following PUT confusion

Severity
9.8critical CVSS:3.1 by CISA-ADP
Exploit likelihood
5.12% (higher than 92% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
hackerone
Also known as
CURL-CVE-2022-32221

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

Product or packageVersionsReported by
https://github.com/curl/curlFixed in 7.86.0CVE List
https://github.com/curl/curl.gitfrom 7.7 before 7.86.0, from 546572da0457f37c698c02d0a08d90fdfcbeedec before a64e3e59938abd7d667e4470a18072a24d7e9de9curl
haxx curlbefore 7.86.0NVD
netapp clustered_data_ontapNot specifiedNVD
netapp h300s_firmwareNot specifiedNVD
netapp h500s_firmwareNot specifiedNVD
netapp h700s_firmwareNot specifiedNVD
netapp h410s_firmwareNot specifiedNVD
debian debian_linux10.0, 11.0NVD
apple macosbefore 12.6.3NVD
splunk universal_forwarderfrom 8.2.0 before 8.2.12, from 9.0.0 before 9.0.6, 9.1.0NVD

All scores

CISA-ADP9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
curlmedium rating
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-200CWE-668

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

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.

NVD (es)

Al realizar transferencias HTTP(S), libcurl podría usar erróneamente la devolución de llamada de lectura (`CURLOPT_READFUNCTION`) para solicitar datos para enviar, incluso cuando se haya configurado la opción `CURLOPT_POSTFIELDS`, si anteriormente se usó el mismo identificador para emitir un `PUT `solicitud que utilizó esa devolución de llamada. Esta falla puede sorprender a la aplicación y hacer que se comporte mal y envíe datos incorrectos o use memoria después de liberarla o algo similar en la solicitud "POST" posterior. El problema existe en la lógica de un identificador reutilizado cuando se cambia de PUT a POST.

References

https://hackerone.com/reports/1704017exploit, issue-tracking, third-party-advisory
https://security.gentoo.org/glsa/202212-01third-party-advisory, vendor-advisory
https://security.netapp.com/advisory/ntap-20230110-0006/third-party-advisory
https://support.apple.com/kb/HT213604third-party-advisory
https://support.apple.com/kb/HT213605third-party-advisory
http://seclists.org/fulldisclosure/2023/Jan/20mailing-list, third-party-advisory
http://seclists.org/fulldisclosure/2023/Jan/19mailing-list, third-party-advisory
https://www.debian.org/security/2023/dsa-5330third-party-advisory, vendor-advisory
https://lists.debian.org/debian-lts-announce/2023/01/msg00028.htmlmailing-list, third-party-advisory
https://security.netapp.com/advisory/ntap-20230208-0002/third-party-advisory
http://www.openwall.com/lists/oss-security/2023/05/17/4mailing-list
https://cert-portal.siemens.com/productcert/html/ssa-892048.html

Sources

SourceRecordLicence
CVE ListCVE-2022-32221 changed 2026-10-14CVE Terms of Use
curlCURL-CVE-2022-32221 changed 2026-10-25MIT
NVDCVE-2022-32221 changed 2026-10-14Public domain