Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 26 Oct 2022 08:26:44 +0200 (CEST)
From: Daniel Stenberg <>
To: curl security announcements -- curl users <>,, libcurl hacking <>,
Subject: [SECURITY ADVISORY] CVE-2022-42915: HTTP proxy double-free (curl)

CVE-2022-42915: HTTP proxy double-free

Project curl Security Advisory, October 26 2022 -


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 response 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`

We are not aware of any exploit of this flaw.


The bug was introduced in [this commit](

The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CVE-2022-42915 to this issue.

CWE-415: Double Free

Severity: medium


- Affected versions: curl 7.77.0 to and including 7.85.0
- Not affected versions: curl < 7.77.0 and >= 7.86.0

libcurl is used by many applications, but not always advertised as such!


[The fix for CVE-2022-42915](


  A - Upgrade curl to version 7.86.0

  B - Apply the patch to your local version

  C - Do not do use HTTP proxy


This issue was reported to the curl project on October 4, 2022. We contacted
distros@...nwall on October 18, 2022.

libcurl 7.86.0 was released on October 26 2022, coordinated with the
publication of this advisory.


This report was part of the security audit performed by Trail of Bits.

- Reported-by: Trail of Bits
- Patched-by: Daniel Stenberg

Thanks a lot!


  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.