cve.bz

CVE-2018-16840 Use After Free

9.8 criticalEPSS 3.4%Fix available

Critical (9.8). EPSS 3.4% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
3.4% (unchanged from 3.4% a week ago; 3.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-23. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-04-16. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2018-16840 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2018-16840?via=ask-ai-copy and https://cve.bz/cve/CVE-2018-16840?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2018-16840 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
haxx:curlfrom 7.59.0 before 7.62.0
canonical:ubuntu_linux14.04
canonical:ubuntu_linux16.04
canonical:ubuntu_linux18.04
canonical:ubuntu_linux18.10

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14curl7.62.0-1DEBIAN-CVE-2018-16840
Ubuntu14.04:LTScurl7.35.0-1ubuntu2.19USN-3805-1
Ubuntu16.04:LTScurl7.47.0-1ubuntu2.11USN-3805-1
Ubuntu18.04:LTScurl7.58.0-2ubuntu3.5USN-3805-1
SUSELinux Enterprise Desktop 12 SP3, Linux Enterprise Server 12 SP3, Linux Enterprise Server for SAP Applications 12 SP3 and 1 morecurl7.37.0-37.31.1SUSE-SU-2018:3608-1
SUSELinux Enterprise Desktop 12 SP4, Linux Enterprise Server 12 SP4, Linux Enterprise Server for SAP Applications 12 SP4 and 1 morecurl7.60.0-4.3.1SUSE-SU-2019:0339-1
SUSELinux Enterprise Module for Basesystem 15curl7.60.0-3.14.3SUSE-SU-2018:3624-1
SUSELinux Enterprise Server 11 SP4, Linux Enterprise Server for SAP Applications 11 SP4, Linux Enterprise Software Development Kit 11 SP4curl7.37.0-70.38.1SUSE-SU-2018:3681-1
SUSELinux Enterprise Server 11-SECURITYcurl-openssl17.37.0-70.38.1SUSE-SU-2018:3681-1
openSUSETumbleweedcurl7.79.1-1.1openSUSE-SU-2024:10582-1
Alpinev3.5, v3.6, v3.7 and 1 morecurl7.61.1-r1ALPINE-CVE-2018-16840
Alpinev3.9, v3.10, v3.11 and 13 morecurl7.62.0-r0ALPINE-CVE-2018-16840

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Low.

ProductPackageStateAdvisory
JBoss Core Services Apache HTTP Server 2.4.29 SP2Fixed 2019-06-18RHSA-2019:1543
.NET Core 1.0 on Red Hat Enterprise Linuxrh-dotnetcore10-curlNot affected
.NET Core 1.1 on Red Hat Enterprise Linuxrh-dotnetcore11-curlNot affected
.NET Core 2.1 on Red Hat Enterprise Linuxrh-dotnet21-curlNot affected
Red Hat Enterprise Linux 5curlNot affected
Red Hat Enterprise Linux 6curlNot affected
Red Hat Enterprise Linux 7curlNot affected
Red Hat Enterprise Linux 8curlNot affected
Red Hat JBoss Core Servicesjbcs-httpd24-curlAffected
Red Hat JBoss Web Server 5curlNot affected
Red Hat Software Collectionshttpd24-curlFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2018-16840.

References

Check your stackJSON