---
id: CVE-2022-42915
title: curl before 7.86.0 has a double free
summary: >-
  curl before 7.86.0 has a double free. If curl is told to use an HTTP proxy for
  a transfer with a non-HTTP(S) URL, it sets up the connection to the remote
  server by issuing a CONNECT request to the proxy, and then tunnels the rest of
  the …
severity: high
cvss: 8.1
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-415
  - CWE-415
vendor: haxx
product: curl
affected:
  - 'curl >= 7.77.0, < 7.86.0'
  - fedora = 35
  - fedora = 36
  - fedora = 37
  - h300s_firmware
  - h500s_firmware
  - h700s_firmware
  - h410s_firmware
  - ontap_9
  - 'macos >= 12.0.0, < 12.6.3'
  - 'macos >= 13.0, < 13.2'
  - 'universal_forwarder >= 8.2.0, < 8.2.12'
  - 'universal_forwarder >= 9.0.0, < 9.0.6'
  - universal_forwarder = 9.1.0
patched:
  - curl 7.86.0
  - macos 13.2
  - universal_forwarder 9.0.6
published: '2022-10-29'
updated: '2026-10-14'
sourceUpdated: '2026-10-14T19:16:52.730'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2022-42915'
references:
  - url: 'http://seclists.org/fulldisclosure/2023/Jan/19'
    label: cve@mitre.org
  - url: 'http://seclists.org/fulldisclosure/2023/Jan/20'
    label: cve@mitre.org
  - url: 'https://curl.se/docs/CVE-2022-42915.html'
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/37YEVVC6NAF6H7UHH6YAUY5QEVY6LIH2/
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HVU3IMZCKR4VE6KJ4GCWRL2ILLC6OV76/
    label: cve@mitre.org
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Q27V5YYMXUVI6PRZQVECON32XPVWTKDK/
    label: cve@mitre.org
  - url: 'https://security.gentoo.org/glsa/202212-01'
    label: cve@mitre.org
  - url: 'https://security.netapp.com/advisory/ntap-20221209-0010/'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT213604'
    label: cve@mitre.org
  - url: 'https://support.apple.com/kb/HT213605'
    label: cve@mitre.org
  - url: 'http://seclists.org/fulldisclosure/2023/Jan/19'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'http://seclists.org/fulldisclosure/2023/Jan/20'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://curl.se/docs/CVE-2022-42915.html'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/37YEVVC6NAF6H7UHH6YAUY5QEVY6LIH2/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HVU3IMZCKR4VE6KJ4GCWRL2ILLC6OV76/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/Q27V5YYMXUVI6PRZQVECON32XPVWTKDK/
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202212-01'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.netapp.com/advisory/ntap-20221209-0010/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT213604'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://support.apple.com/kb/HT213605'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-398330.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
  - url: 'https://cert-portal.siemens.com/productcert/html/ssa-892048.html'
    label: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
tags:
  - nvd
epss: 0.02926
epssPercentile: 0.86804
ingestedAt: '2026-10-14T19:49:57.523Z'
---

## Overview

curl before 7.86.0 has a double free. If curl is told to use an HTTP proxy for a transfer with a non-HTTP(S) URL, it sets up the connection to the remote server by issuing a CONNECT request to the proxy, and then tunnels the rest of the protocol through. An HTTP proxy might refuse this request (HTTP proxies often only allow outgoing connections to specific port numbers, like 443 for HTTPS) and instead return a non-200 status code to the client. Due to flaws in the error/cleanup handling, this could trigger a double free in curl if one of the following schemes were used in the URL for the transfer: dict, gopher, gophers, ldap, ldaps, rtmp, rtmps, or telnet. The earliest affected version is 7.77.0.

## Affected

- `curl >= 7.77.0, < 7.86.0`
- `fedora = 35`
- `fedora = 36`
- `fedora = 37`
- `h300s_firmware`
- `h500s_firmware`
- `h700s_firmware`
- `h410s_firmware`
- `ontap_9`
- `macos >= 12.0.0, < 12.6.3`
- `macos >= 13.0, < 13.2`
- `universal_forwarder >= 8.2.0, < 8.2.12`
- `universal_forwarder >= 9.0.0, < 9.0.6`
- `universal_forwarder = 9.1.0`

## Remediation

Upgrade past the affected range:

- `curl 7.86.0`
- `macos 13.2`
- `universal_forwarder 9.0.6`
