CVE-2018-16840 json
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.
published 8y ago modified 4mo ago also EUVD-2018-8636
- cvss
- 4.3
- version 3.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.4%
- EPSS 3.4% chance of exploitation in 30 days, percentile 88%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- haxx curl 7.62.0
- curl Debian 14, Debian 13, Debian 12 7.62.0-1
debian advisories DEBIAN-CVE-2018-16840
- curl SLES for SAP 12 SP4, SLES 12 SP4, SLED 12 SP4 +1 more 7.60.0-4.3.1
- curl SLES for SAP 11 SP4, SLES 11 SP4, SLE Software Development Kit 11 SP4 7.37.0-70.38.1
- curl-openssl1 SLES 11-SECURITY 7.37.0-70.38.1
- curl SLE Module for Basesystem 15 7.60.0-3.14.3
- curl SLES for SAP 12 SP3, SLES 12 SP3, SLED 12 SP3 +1 more 7.37.0-37.31.1
suse advisories SUSE-SU-2019:0339-1SUSE-SU-2018:3681-1SUSE-SU-2018:3624-1SUSE-SU-2018:3608-1
- curl openSUSE Tumbleweed 7.79.1-1.1
opensuse advisories openSUSE-SU-2024:10582-1
- curl Alpine 3.24, Alpine 3.23, Alpine 3.22 +13 more 7.62.0-r0
- curl Alpine 3.8, Alpine 3.7, Alpine 3.6 +1 more 7.61.1-r1
alpine advisories ALPINE-CVE-2018-16840
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/curl/curl@81d135d commit
- curl.haxx.se/docs/CVE-2018-16840.html advisory
Is CVE-2018-16840 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2018-16840 updated cvss 5.0
curl: Use-after-free when closing "easy" handle in Curl_close()
-
Red Hat JBoss Core Services jbcs-httpd24-curl jbcs-httpd24-curlaffected: no fix available
-
Red Hat Software Collections httpd24-curl, httpd24-libcurlaffected: no fix available “Fix deferred”
-
Red Hat JBoss Core Services Apache HTTP Server 2.4.29 SP2fixed: vendor fix RHSA-2019:1543
-
Red Hat .NET Core 1.0 on Red Hat Enterprise Linux rh-dotnetcore10-curl Red Hat .NET Core 1.1 on Red Hat Enterprise Linux rh-dotnetcore11-curl Red Hat .NET Core 2.1 on Red Hat Enterprise Linux rh-dotnet21-curl, rh-dotnet21-libcurl Red Hat Enterprise Linux 5 curl Red Hat Enterprise Linux 6 curl, libcurl Red Hat Enterprise Linux 7 curl, libcurlnot affected: vulnerable code not present
+2 more productsfewer
Red Hat Enterprise Linux 8 curl, libcurl, libcurl-minimal Red Hat JBoss Web Server 5 curl
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 6mo ago
Exploit prediction
3.40% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.0 | 4.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N |
| NVD | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 2.0 | 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected products
- The Curl Project curl
Classification
- Weakness
-
- CWE-416 Use After Free
References
-
github.com
/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f
patch, third-party-advisory
-
curl.haxx.se
/docs/CVE-2018-16840.html
patch, vendor-advisory
-
security.gentoo.org
/glsa/201903-03
vendor-advisory, third-party-advisory
-
usn.ubuntu.com
/3805-1/
vendor-advisory, third-party-advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=CVE-2018-16840
issue-tracking, third-party-advisory
-
securitytracker.com
/id/1042013
vdb-entry, third-party-advisory
Sources
- CVE List CVE-2018-16840
- NVD CVE-2018-16840
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.