CVE-2018-16840

Source
https://cve.org/CVERecord?id=CVE-2018-16840
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2018-16840.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2018-16840
Aliases
Downstream
Related
Published
2018-10-31T18:29:00Z
Modified
2026-09-10T09:11:35Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
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.

Database specific
{
    "unresolved_ranges": [
        {
            "cpes": [
                "cpe:2.3:o:canonical:ubuntu_linux:14.04:*:*:*:lts:*:*:*",
                "cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*",
                "cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*",
                "cpe:2.3:o:canonical:ubuntu_linux:18.10:*:*:*:*:*:*:*"
            ],
            "extracted_events": [
                {
                    "introduced": "14.04"
                },
                {
                    "last_affected": "14.04"
                },
                {
                    "introduced": "16.04"
                },
                {
                    "last_affected": "16.04"
                },
                {
                    "introduced": "18.04"
                },
                {
                    "last_affected": "18.04"
                },
                {
                    "introduced": "18.10"
                },
                {
                    "last_affected": "18.10"
                }
            ],
            "source": "CPE_STRING",
            "vendor_product": "canonical:ubuntu_linux"
        }
    ]
}
References

Affected packages

Git / github.com/curl/curl

Affected ranges

Type
GIT
Repo
https://github.com/curl/curl
Events
Database specific
Show details
{
    "cpe": "cpe:2.3:a:haxx:curl:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "7.59.0"
        },
        {
            "fixed": "7.62.0"
        }
    ],
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ]
}

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2018-16840.json"
vanir_signatures
[
    {
        "deprecated": false,
        "digest": {
            "function_hash": "253867143457341161698845574111827314122",
            "length": 1388
        },
        "id": "CVE-2018-16840-5a294ae8",
        "signature_type": "Function",
        "signature_version": "v1",
        "source": "https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f",
        "target": {
            "file": "lib/url.c",
            "function": "Curl_close"
        }
    },
    {
        "deprecated": false,
        "digest": {
            "line_hashes": [
                "76450436232552618053190577593466383274",
                "56283251733270634435040735386618773715",
                "225146506795074944162099681821124504277",
                "72162716836877692358628916813877661635",
                "28202728034268574745574819732142521908"
            ],
            "threshold": 0.9
        },
        "id": "CVE-2018-16840-97a670ad",
        "signature_type": "Line",
        "signature_version": "v1",
        "source": "https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f",
        "target": {
            "file": "lib/url.c"
        }
    }
]
vanir_signatures_modified
"2026-09-10T09:11:35Z"