CVE-2022-42915: Double Free
A vulnerability was found in curl. The issue occurs 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 response code to the client. Due to flaws in the error/cleanup handling, this could trigger a double-free issue in curl if using one of the following schemes in the URL for the transfer: dict, gopher, gophers, ldap, ldaps, rtmp, rtmps, telnet.
Other sources
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.
— Microsoft
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.
curl. Multiple issues were addressed by updating to curl version 7.86.0.
— Apple
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 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 respons 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, telnet
Reference:
https://curl.se/docs/CVE-2022-42915.html
— Red Hat
Credit
Affected Software
Event History
Parent advisories
This vulnerability appears in the following advisories.
Peer vulnerabilities
Found alongside the following vulnerabilities.
- CVE-2023-23499
- CVE-2022-42915
- CVE-2022-42916
- CVE-2022-32221
- CVE-2022-35260
- CVE-2022-35252
- CVE-2023-23513
- CVE-2023-23493
- CVE-2022-32915
- CVE-2023-23507
- CVE-2023-23516
- CVE-2023-23504
- CVE-2023-23502
- CVE-2022-42834
- CVE-2023-23497
- CVE-2023-23505
- CVE-2023-27931
- CVE-2023-23511
- CVE-2023-23518
- CVE-2023-23517
- CVE-2023-23508
- CVE-2023-32438
- CVE-2023-23520
- CVE-2023-23539
- CVE-2023-41990
- CVE-2023-23530
- CVE-2023-23531
- CVE-2023-23519
- CVE-2023-23500
- CVE-2023-23506
- CVE-2023-23498
- CVE-2023-23503
- CVE-2023-28208
- CVE-2023-23510
- CVE-2023-23512
- CVE-2022-3705
- CVE-2023-32393
- CVE-2023-23496
- CVE-2023-23501
- CVE-2022-0108
Frequently Asked Questions
What is the vulnerability ID?
The vulnerability ID is CVE-2022-42915.
What is the severity of CVE-2022-42915?
The severity of CVE-2022-42915 is high.
Which software versions are affected by CVE-2022-42915?
Software versions before curl 7.86.0 are affected by CVE-2022-42915.
How do I fix CVE-2022-42915 in macOS Monterey?
To fix CVE-2022-42915 in macOS Monterey, update to version 12.6.3.
How do I fix CVE-2022-42915 in Red Hat?
To fix CVE-2022-42915 in Red Hat, update to version 7.86.0.