{"id":"CVE-2018-16840","state":"PUBLISHED","title":"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","description":"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.","publishedAt":"2018-10-31T18:00:00.000Z","updatedAt":"2026-04-16T14:08:57.315Z","severity":{"score":4.3,"label":"Medium","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","source":"redhat"},"assigner":"redhat","products":["The Curl Project curl"],"affected":[{"vendor":"The Curl Project","product":"curl","versions":[{"version":"from 7.59.0 to 7.61.1","status":"affected"}]}],"references":["https://security.gentoo.org/glsa/201903-03","https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840","https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f","http://www.securitytracker.com/id/1042013","https://curl.haxx.se/docs/CVE-2018-16840.html","https://usn.ubuntu.com/3805-1/"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T19:44:25.237Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2018/16xxx/CVE-2018-16840.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2018-16840","state":"PUBLISHED","datePublished":"2018-10-31T18:00:00.000Z","dateUpdated":"2026-04-16T14:08:57.315Z","assignerShortName":"redhat","assignerOrgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateReserved":"2018-09-11T00:00:00.000Z"},"containers":{"cna":{"descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"The Curl Project","product":"curl","versions":[{"version":"from 7.59.0 to 7.61.1","status":"affected"}]}],"references":[{"url":"https://security.gentoo.org/glsa/201903-03","name":"GLSA-201903-03","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f","tags":["x_refsource_CONFIRM"]},{"url":"http://www.securitytracker.com/id/1042013","name":"1042013","tags":["vdb-entry","x_refsource_SECTRACK"]},{"url":"https://curl.haxx.se/docs/CVE-2018-16840.html","tags":["x_refsource_MISC"]},{"url":"https://usn.ubuntu.com/3805-1/","name":"USN-3805-1","tags":["vendor-advisory","x_refsource_UBUNTU"]}],"metrics":[{"cvssV3_0":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":4.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","version":"3.0"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","description":"CWE-416","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat","dateUpdated":"2019-03-11T09:57:01.000Z","orgId":"53f830b8-0a3f-465b-8143-3b8a9948e749"},"datePublic":"2018-10-31T00:00:00.000Z","x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"secalert@redhat.com","ID":"CVE-2018-16840","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"curl","version":{"version_data":[{"version_value":"from 7.59.0 to 7.61.1"}]}}]},"vendor_name":"The Curl Project"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":[[{"vectorString":"4.3/CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","version":"3.0"}]]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-416"}]}]},"references":{"reference_data":[{"name":"GLSA-201903-03","refsource":"GENTOO","url":"https://security.gentoo.org/glsa/201903-03"},{"name":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840","refsource":"CONFIRM","url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840"},{"name":"https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f","refsource":"CONFIRM","url":"https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f"},{"name":"1042013","refsource":"SECTRACK","url":"http://www.securitytracker.com/id/1042013"},{"name":"https://curl.haxx.se/docs/CVE-2018-16840.html","refsource":"MISC","url":"https://curl.haxx.se/docs/CVE-2018-16840.html"},{"name":"USN-3805-1","refsource":"UBUNTU","url":"https://usn.ubuntu.com/3805-1/"}]}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://security.gentoo.org/glsa/201903-03","name":"GLSA-201903-03","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f","tags":["x_refsource_CONFIRM","x_transferred"]},{"url":"http://www.securitytracker.com/id/1042013","name":"1042013","tags":["vdb-entry","x_refsource_SECTRACK","x_transferred"]},{"url":"https://curl.haxx.se/docs/CVE-2018-16840.html","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://usn.ubuntu.com/3805-1/","name":"USN-3805-1","tags":["vendor-advisory","x_refsource_UBUNTU","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-05T10:32:53.993Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-04-16T14:08:48.093326Z","id":"CVE-2018-16840","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-04-16T14:08:57.315Z"}}]}}}