{"api_version":"1","generated_at":"2026-04-23T02:35:34+00:00","cve":"CVE-2018-16840","urls":{"html":"https://cve.report/CVE-2018-16840","api":"https://cve.report/api/cve/CVE-2018-16840.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2018-16840","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2018-16840"},"summary":{"title":"CVE-2018-16840","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.","state":"PUBLIC","assigner":"secalert@redhat.com","published_at":"2018-10-31 18:29:00","updated_at":"2019-10-09 23:36:00"},"problem_types":["CWE-416"],"metrics":[],"references":[{"url":"https://security.gentoo.org/glsa/201903-03","name":"GLSA-201903-03","refsource":"GENTOO","tags":["Third Party Advisory"],"title":"cURL: Multiple vulnerabilities (GLSA 201903-03) — Gentoo security","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"http://www.securitytracker.com/id/1042013","name":"1042013","refsource":"SECTRACK","tags":["Third Party Advisory","VDB Entry"],"title":"curl Use-After-Free Memory Error in Curl_close() Lets Remote Users Deny Service - SecurityTracker","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840","name":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840","refsource":"CONFIRM","tags":["Issue Tracking","Third Party Advisory"],"title":"1642203 – (CVE-2018-16840) CVE-2018-16840 curl: Use-after-free when closing \"easy\" handle in Curl_close()","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://curl.haxx.se/docs/CVE-2018-16840.html","name":"https://curl.haxx.se/docs/CVE-2018-16840.html","refsource":"MISC","tags":["Patch","Vendor Advisory"],"title":"curl - use-after-free in handle close - CVE-2018-16840","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://usn.ubuntu.com/3805-1/","name":"USN-3805-1","refsource":"UBUNTU","tags":["Third Party Advisory"],"title":"USN-3805-1: curl vulnerabilities | Ubuntu security notices","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f","name":"https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f","refsource":"CONFIRM","tags":["Patch","Third Party Advisory"],"title":"Curl_close: clear data->multi_easy on free to avoid use-after-free · curl/curl@81d135d · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.cve.org/CVERecord?id=CVE-2018-16840","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2018-16840","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"14.04","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"lts","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"16.04","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"lts","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"18.04","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"lts","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"18.10","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"14.04","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"lts","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"16.04","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"lts","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"18.04","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"lts","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"1","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"canonical","cpe5":"ubuntu_linux","cpe6":"18.10","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2018","cve_id":"16840","vulnerable":"1","versionEndIncluding":"7.61.1","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"haxx","cpe5":"curl","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2018-16840","qid":"500126","title":"Alpine Linux Security Update for curl"},{"cve":"CVE-2018-16840","qid":"503781","title":"Alpine Linux Security Update for curl"},{"cve":"CVE-2018-16840","qid":"710197","title":"Gentoo Linux cURL Multiple Vulnerabilities (GLSA 201903-03)"}]},"source_records":{"cve_program":{"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/"}]}},"nvd":{"publishedDate":"2018-10-31 18:29:00","lastModifiedDate":"2019-10-09 23:36:00","problem_types":["CWE-416"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.0","vectorString":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL"},"exploitabilityScore":3.9,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":7.5},"severity":"HIGH","exploitabilityScore":10,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:haxx:curl:*:*:*:*:*:*:*:*","versionStartIncluding":"7.59.0","versionEndIncluding":"7.61.1","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2018","CveId":"16840","Ordinal":"133651","Title":"CVE-2018-16840","CVE":"CVE-2018-16840","Year":"2018"},"notes":[{"CveYear":"2018","CveId":"16840","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2018","CveId":"16840","Ordinal":"2","NoteData":"2018-10-31","Type":"Other","Title":"Published"},{"CveYear":"2018","CveId":"16840","Ordinal":"3","NoteData":"2019-03-11","Type":"Other","Title":"Modified"}]}}}