CVE-2018-16840
Description
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
MEDIUM
CVSS v3
4.3
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N · source cna
Exploit chance (EPSS)
3.426%
chance of exploitation in the next 30 days
higher than 89.1% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-416: Use After Free
CISA SSVC decision points
| Exploitation | none |
|---|---|
| Automatable | no |
| Technical impact | partial |
| Scored | 2026-04-16 |
Timeline
- 2018-10-31Published by the CNA18:00 UTC
- 2026-04-16CISA SSVC decision recorded2724 days after publication
Affected products
Products listed as vulnerable. Upgrade to the version under "Fixed in", or a later one.
| Product | Vulnerable versions | Fixed in |
|---|---|---|
| haxx curl | from 7.59.0 before 7.62.0fixed in 7.62.0 | 7.62.0 |
| canonical ubuntu_linux | 14.04no fix listed16.04no fix listed18.04no fix listed18.10no fix listed | not listednot listednot listednot listed |
References
- https://curl.haxx.se/docs/CVE-2018-16840.html
- https://github.com/curl/curl/commit/81d135d67155c5295b1033679c606165d4e28f3f
- https://security.gentoo.org/glsa/201903-03
- https://usn.ubuntu.com/3805-1/
- http://www.securitytracker.com/id/1042013
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2018-16840
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2018-16840'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2018-16840'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2018-16840'curl 'https://api.contrastcyber.com/cve_products/CVE-2018-16840'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- OWASP Top 10 categories by the OWASP Foundation (CC BY 3.0).
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).