BreachSpiderVerified, not vibes

CVE-2018-16840 in Canonical Ubuntu Linux and 1 more product

Critical 9.8 Fix available

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 wri...

Affects 2 products from 2 vendors. Facts below cite their sources.

CVSS 3.19.8
EPSS3.4%
EPSS percentile90th
FixAvailable

Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, full integrity impact, full availability impact.

Affected products and versions

VendorProductAffected versions
Canonical Ubuntu Linux 14.04 16.04 18.04 18.10
Haxx Curl ≥ 7.59.0, < 7.62.0

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

View Vendor Advisory →

Vendor PSIRT: [email protected]

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2018-16840
BreachSpider IDBS-2018-GLOBAL-341649-C
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published2018-10-31
Last modified2025-04-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-416: Use After Free

Software references memory after it has been freed, leading to corruption, crashes, or code execution.

Analysis AI-written, not human-reviewed

This vulnerability was disclosed in 2018. A critical vulnerability affects Canonical systems (CVE-2018-16840). No public exploit code is currently available. Isolate affected systems if patching is not feasible.

Vulnerability details: 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. CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Questions

What is CVE-2018-16840?

This vulnerability was disclosed in 2018. A critical vulnerability affects Canonical systems (CVE-2018-16840). No public exploit code is currently available. Isolate affected systems if patching is not feasible.

What is the CVSS score for CVE-2018-16840?

CVE-2018-16840 has CVSS 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. EPSS: 3.4%.

Is CVE-2018-16840 actively exploited?

No confirmed active exploitation of CVE-2018-16840 as of 2026-05-30.

How do I remediate CVE-2018-16840?

Priority: MEDIUM. Advisory: https://curl.haxx.se/docs/CVE-2018-16840.html PSIRT: [email protected]

What systems are affected by CVE-2018-16840?

CVE-2018-16840 affects Canonical Ubuntu Linux; Haxx Curl.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Canonical","product":"Ubuntu Linux","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2025-04-17.