{
  "schema_version": "1.5.0",
  "id": "CURL-CVE-2018-16840",
  "aliases": [
    "CVE-2018-16840"
  ],
  "summary": "use after free in handle close",
  "modified": "2026-04-25T17:48:46.00Z",
  "database_specific": {
    "package": "curl",
    "affects": "both",
    "URL": "https://curl.se/docs/CVE-2018-16840.json",
    "www": "https://curl.se/docs/CVE-2018-16840.html",
    "CWE": {
      "id": "CWE-416",
      "desc": "Use After Free"
    },
    "award": {
      "amount": "100",
      "currency": "USD"
    },
    "last_affected": "7.61.1",
    "severity": "Low"
  },
  "published": "2018-10-31T08:00:00.00Z",
  "affected": [
    {
      "ranges": [
        {
           "type": "SEMVER",
           "events": [
             {"introduced": "7.59.0"},
             {"fixed": "7.62.0"}
           ]
        },
        {
           "type": "GIT",
           "repo": "https://github.com/curl/curl.git",
           "events": [
             {"introduced": "b46cfbc068ebe90f18e9777b9e877e4934c1b5e3"},
             {"fixed": "81d135d67155c5295b1033679c606165d4e28f3f"}
           ]
        }
      ],
      "versions": [
        "7.61.1", "7.61.0", "7.60.0", "7.59.0"
      ]
    }
  ],
  "credits": [
    {
      "name": "Brian Carpenter (Geeknik Labs)",
      "type": "FINDER"
    },
    {
      "name": "Daniel Stenberg",
      "type": "REMEDIATION_DEVELOPER"
    }
  ],
  "details": "libcurl contains a heap use after free flaw in code related to closing an easy\nhandle.\n\nWhen closing and cleaning up an \"easy\" handle in the `Curl_close()` function,\nthe library code first frees a struct (without clearing the pointer) and might\nthen subsequently erroneously write to a struct field within that already\nfreed struct."
}