{"id":"UBUNTU-CVE-2018-16840","details":"A heap use-after-free flaw was found in curl versions from 7.59.0 through 7.61.1 in the code related to closing an easy handle. When closing and cleaning up an 'easy' handle in the `Curl_close()` function, the library code first frees a struct (without nulling the pointer) and might then subsequently erroneously write to a struct field within that already freed struct.","modified":"2026-01-30T02:38:35.469977Z","published":"2018-10-31T00:00:00Z","withdrawn":"2025-07-18T16:44:45Z","related":["USN-3805-1"],"upstream":["CVE-2018-16840"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2018-16840"},{"type":"REPORT","url":"https://curl.haxx.se/docs/CVE-2018-16840.html"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-3805-1"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2018-16840"}],"affected":[{"package":{"name":"curl","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/curl@7.58.0-2ubuntu3.3?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"7.58.0-2ubuntu3.3"}]}],"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"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"curl","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"curl-dbgsym","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl3-gnutls","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl3-gnutls-dbgsym","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl3-nss","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl3-nss-dbgsym","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl4","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl4-dbgsym","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl4-doc","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl4-gnutls-dev","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl4-nss-dev","binary_version":"7.58.0-2ubuntu3.3"},{"binary_name":"libcurl4-openssl-dev","binary_version":"7.58.0-2ubuntu3.3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2018/UBUNTU-CVE-2018-16840.json"}}],"schema_version":"1.7.3","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.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"},{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}