Skip to content
Fencer Vulns
medium 4.3

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 2018-10-31 8 y ago modified 2026-06-17 4 mo 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

  • curl Arch Linux 7.62.0-1
  • lib32-curl Arch Linux 7.62.0-1
  • lib32-libcurl-compat Arch Linux 7.62.0-1
  • lib32-libcurl-gnutls Arch Linux 7.62.0-1
  • libcurl-gnutls Arch Linux 7.62.0-1
  • libcurl-compat Arch Linux 7.62.0-1

arch linux advisories AVG-795AVG-796AVG-797AVG-798AVG-799AVG-800

Vendor 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-curl
    affected: no fix available
  • Red Hat Software Collections httpd24-curl, httpd24-libcurl
    affected: no fix available “Fix deferred”
  • Red Hat JBoss Core Services Apache HTTP Server 2.4.29 SP2
    fixed: 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, libcurl
    +2 more products
    Red Hat Enterprise Linux 8 curl, libcurl, libcurl-minimal Red Hat JBoss Web Server 5 curl
    not affected: vulnerable code not present

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
6 mo ago

Exploit prediction

3.40% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).

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

References

Sources

Fencer Vulns 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.