{"id":"UBUNTU-CVE-2022-32221","details":"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.","modified":"2026-04-22T15:34:33.339451Z","published":"2022-10-26T07:00:00Z","related":["USN-5702-1","USN-5702-2","USN-5823-1"],"upstream":["CVE-2022-32221"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-32221"},{"type":"REPORT","url":"https://curl.se/docs/CVE-2022-32221.html"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5702-1"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5702-2"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-5823-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-32221"}],"affected":[{"package":{"name":"curl","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/curl@7.35.0-1ubuntu2.20+esm13?arch=source&distro=trusty/esm"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.35.0-1ubuntu2.20+esm13"}]}],"versions":["7.32.0-1ubuntu1","7.33.0-1ubuntu1","7.34.0-1ubuntu1","7.35.0-1ubuntu1","7.35.0-1ubuntu2","7.35.0-1ubuntu2.1","7.35.0-1ubuntu2.2","7.35.0-1ubuntu2.3","7.35.0-1ubuntu2.5","7.35.0-1ubuntu2.6","7.35.0-1ubuntu2.7","7.35.0-1ubuntu2.8","7.35.0-1ubuntu2.9","7.35.0-1ubuntu2.10","7.35.0-1ubuntu2.11","7.35.0-1ubuntu2.12","7.35.0-1ubuntu2.13","7.35.0-1ubuntu2.14","7.35.0-1ubuntu2.15","7.35.0-1ubuntu2.16","7.35.0-1ubuntu2.17","7.35.0-1ubuntu2.19","7.35.0-1ubuntu2.20","7.35.0-1ubuntu2.20+esm2","7.35.0-1ubuntu2.20+esm3","7.35.0-1ubuntu2.20+esm4","7.35.0-1ubuntu2.20+esm5","7.35.0-1ubuntu2.20+esm6","7.35.0-1ubuntu2.20+esm7","7.35.0-1ubuntu2.20+esm8","7.35.0-1ubuntu2.20+esm9","7.35.0-1ubuntu2.20+esm10","7.35.0-1ubuntu2.20+esm11","7.35.0-1ubuntu2.20+esm12"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_name":"curl","binary_version":"7.35.0-1ubuntu2.20+esm13"},{"binary_name":"libcurl3","binary_version":"7.35.0-1ubuntu2.20+esm13"},{"binary_name":"libcurl3-gnutls","binary_version":"7.35.0-1ubuntu2.20+esm13"},{"binary_name":"libcurl3-nss","binary_version":"7.35.0-1ubuntu2.20+esm13"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-32221.json"}},{"package":{"name":"curl","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/curl@7.47.0-1ubuntu2.19+esm6?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.47.0-1ubuntu2.19+esm6"}]}],"versions":["7.43.0-1ubuntu2","7.45.0-1ubuntu1","7.46.0-1ubuntu1","7.47.0-1ubuntu1","7.47.0-1ubuntu2","7.47.0-1ubuntu2.1","7.47.0-1ubuntu2.2","7.47.0-1ubuntu2.3","7.47.0-1ubuntu2.4","7.47.0-1ubuntu2.5","7.47.0-1ubuntu2.6","7.47.0-1ubuntu2.7","7.47.0-1ubuntu2.8","7.47.0-1ubuntu2.9","7.47.0-1ubuntu2.11","7.47.0-1ubuntu2.12","7.47.0-1ubuntu2.13","7.47.0-1ubuntu2.14","7.47.0-1ubuntu2.15","7.47.0-1ubuntu2.16","7.47.0-1ubuntu2.18","7.47.0-1ubuntu2.19","7.47.0-1ubuntu2.19+esm1","7.47.0-1ubuntu2.19+esm2","7.47.0-1ubuntu2.19+esm3","7.47.0-1ubuntu2.19+esm4","7.47.0-1ubuntu2.19+esm5"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro","binaries":[{"binary_name":"curl","binary_version":"7.47.0-1ubuntu2.19+esm6"},{"binary_version":"7.47.0-1ubuntu2.19+esm6","binary_name":"libcurl3"},{"binary_name":"libcurl3-gnutls","binary_version":"7.47.0-1ubuntu2.19+esm6"},{"binary_name":"libcurl3-nss","binary_version":"7.47.0-1ubuntu2.19+esm6"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-32221.json"}},{"package":{"name":"curl","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/curl@7.58.0-2ubuntu3.21?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.58.0-2ubuntu3.21"}]}],"versions":["7.55.1-1ubuntu2","7.55.1-1ubuntu2.1","7.57.0-1ubuntu1","7.58.0-2ubuntu1","7.58.0-2ubuntu2","7.58.0-2ubuntu3","7.58.0-2ubuntu3.1","7.58.0-2ubuntu3.2","7.58.0-2ubuntu3.3","7.58.0-2ubuntu3.5","7.58.0-2ubuntu3.6","7.58.0-2ubuntu3.7","7.58.0-2ubuntu3.8","7.58.0-2ubuntu3.9","7.58.0-2ubuntu3.10","7.58.0-2ubuntu3.12","7.58.0-2ubuntu3.13","7.58.0-2ubuntu3.14","7.58.0-2ubuntu3.15","7.58.0-2ubuntu3.16","7.58.0-2ubuntu3.17","7.58.0-2ubuntu3.18","7.58.0-2ubuntu3.19","7.58.0-2ubuntu3.20"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"curl","binary_version":"7.58.0-2ubuntu3.21"},{"binary_name":"libcurl3-gnutls","binary_version":"7.58.0-2ubuntu3.21"},{"binary_name":"libcurl3-nss","binary_version":"7.58.0-2ubuntu3.21"},{"binary_name":"libcurl4","binary_version":"7.58.0-2ubuntu3.21"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-32221.json"}},{"package":{"name":"curl","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/curl@7.68.0-1ubuntu2.14?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.68.0-1ubuntu2.14"}]}],"versions":["7.65.3-1ubuntu3","7.65.3-1ubuntu4","7.66.0-1ubuntu1","7.67.0-2ubuntu1","7.68.0-1ubuntu1","7.68.0-1ubuntu2","7.68.0-1ubuntu2.1","7.68.0-1ubuntu2.2","7.68.0-1ubuntu2.4","7.68.0-1ubuntu2.5","7.68.0-1ubuntu2.6","7.68.0-1ubuntu2.7","7.68.0-1ubuntu2.10","7.68.0-1ubuntu2.11","7.68.0-1ubuntu2.12","7.68.0-1ubuntu2.13"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"curl","binary_version":"7.68.0-1ubuntu2.14"},{"binary_name":"libcurl3-gnutls","binary_version":"7.68.0-1ubuntu2.14"},{"binary_name":"libcurl3-nss","binary_version":"7.68.0-1ubuntu2.14"},{"binary_name":"libcurl4","binary_version":"7.68.0-1ubuntu2.14"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-32221.json"}},{"package":{"name":"curl","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/curl@7.81.0-1ubuntu1.6?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.81.0-1ubuntu1.6"}]}],"versions":["7.74.0-1.3ubuntu2","7.74.0-1.3ubuntu3","7.80.0-3","7.81.0-1","7.81.0-1ubuntu1.1","7.81.0-1ubuntu1.2","7.81.0-1ubuntu1.3","7.81.0-1ubuntu1.4"],"ecosystem_specific":{"binaries":[{"binary_name":"curl","binary_version":"7.81.0-1ubuntu1.6"},{"binary_name":"libcurl3-gnutls","binary_version":"7.81.0-1ubuntu1.6"},{"binary_name":"libcurl3-nss","binary_version":"7.81.0-1ubuntu1.6"},{"binary_name":"libcurl4","binary_version":"7.81.0-1ubuntu1.6"}],"availability":"No subscription required"},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-32221.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}