CVE-2018-16840
Reported by redhat · Published October 31, 2018
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| libcurl-gnutls | Arch Linux | 7.62.0-1 |
| lib32-libcurl-compat | Arch Linux | 7.62.0-1 |
| libcurl | Amazon Linux | 7.61.1-9.amzn2.0.1 |
| lib32-libcurl-gnutls | Arch Linux | 7.62.0-1 |
| curl | haxx | 7.62.0 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| The Curl Project | curl | from 7.59.0 to 7.61.1 |
| arch | libcurl-gnutls | 0 |
| arch | lib32-libcurl-compat | 0 |
| amazon:2 | libcurl | 0 |
| arch | lib32-libcurl-gnutls | 0 |
| alpine | curl | 0, 0 |
| arch | libcurl-compat | 0 |
| arch | lib32-curl | 0 |
| The Curl Project | curl | 7.59.0 |
| amazon:2 | curl | 0 |
| arch | curl | 0 |
| amazon:2 | libcurl-devel | 0 |
Timeline
- Oct 31, 2018 CVE Published
- Apr 14, 2021 EPSS Score (30 in total, the first dated here)
- Mar 6, 2026 Distribution Patch (4 in total, the first dated here)
- Mar 6, 2026 Security Advisory (5 in total, the first dated here)
- May 18, 2026 PoC Published
- Sep 23, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2018-16840
vulnetix vdb fixes CVE-2018-16840
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2018-16840/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- GLSA-201903-03 vendor-advisoryx_refsource_GENTOO
- x_refsource_CONFIRM
- x_refsource_CONFIRM
- 1042013 vdb-entryx_refsource_SECTRACK
- x_refsource_MISC
- USN-3805-1 vendor-advisoryx_refsource_UBUNTU