Use After Free Affecting curl package, versions *


Severity

Recommended
low

Based on Red Hat Enterprise Linux security rating.

Threat Intelligence

EPSS
0.44% (62nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RHEL10-CURL-9899613
  • published29 Apr 2025
  • disclosed31 Oct 2018

Introduced: 31 Oct 2018

CVE-2018-16840  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

There is no fixed version for RHEL:10 curl.

NVD Description

Note: Versions mentioned in the description apply only to the upstream curl package and not the curl package as distributed by RHEL. See How to fix? for RHEL:10 relevant fixed versions and status.

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 Base Scores

version 3.1