Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 11 Sep 2019 08:01:03 +0200 (CEST)
From: Daniel Stenberg <>
To: curl security announcements -- curl users <>,,
        libcurl hacking <>,
Subject: [SECURITY ADVISORY] curl: FTP-KRB double-free

FTP-KRB double-free

Project curl Security Advisory, September 11th 2019 -


libcurl can be told to use kerberos over FTP to a server, as set with the

During such kerberos FTP data transfer, the server sends data to curl in
blocks with the 32 bit size of each block first and then that amount of data
immediately following.

A malicious or just broken server can claim to send a very large block and if
by doing that it makes curl's subsequent call to `realloc()` to fail, curl
would then misbehave in the exit path and double-free the memory.

In practical terms, an up to 4 GB memory area may very well be fine to
allocate on a modern 64 bit system but on 32 bit systems it will fail.

Kerberos FTP is a rarely used protocol with curl. Also, Kerberos
authentication is usually only attempted and used with servers that the client
has a previous association with.

We are not aware of any exploit of this flaw.


This bug was introduced in November 2016 in [commit

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

CWE-415: Double Free

Severity: 6.3 (Medium)


- Affected versions: libcurl >= 7.52.0 to and including 7.65.3
- Not affected versions: libcurl < 7.52.0

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


A [fix for CVE-2019-5481](


We suggest you take one of the following actions immediately, in order of

  A - Upgrade curl to version 7.66.0

  B - Apply the patch to your version and rebuild

  C - do not use `CURLOPT_KRBLEVEL`


The issue was reported to the curl project on September 3, 2019. The fix was done,
verified and communicated with the reporter on September 3, 2019.

We contacted distros@...nwall on September 5.

This advisory was posted on September 11th 2019.


Reported by Thomas Vegas. Patch by Daniel Stenberg.

Thanks a lot!


  / | Get the best commercial curl support there is - from me
                   | 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.