CVE Vulnerabilities

CVE-2022-42915

Double Free

Published: Oct 29, 2022 | Modified: May 07, 2025
CVSS 3.x
8.1
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

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.

Weakness

The product calls free() twice on the same memory address.

Affected Software

NameVendorStart VersionEnd Version
CurlHaxx7.77.0 (including)7.86.0 (excluding)
JBoss Core Services for RHEL 8RedHatjbcs-httpd24-curl-0:7.86.0-2.el8jbcs*
JBoss Core Services on RHEL 7RedHatjbcs-httpd24-curl-0:7.86.0-2.el7jbcs*
Text-Only JBCSRedHatjbcs-httpd24-curl*
CurlUbuntudevel*
CurlUbuntujammy*
CurlUbuntukinetic*
CurlUbuntutrusty*
CurlUbuntuxenial*

Potential Mitigations

References