CVE-2019-5481

9.8 CRITICAL

📋 TL;DR

CVE-2019-5481 is a double-free vulnerability in cURL's FTP-kerberos code that allows remote attackers to execute arbitrary code or cause denial of service. It affects cURL versions 7.52.0 through 7.65.3 when using FTP with Kerberos authentication. Systems using vulnerable cURL libraries or applications that link to them are at risk.

💻 Affected Systems

Products:
  • cURL
  • libcurl
  • applications using libcurl
Versions: 7.52.0 to 7.65.3
Operating Systems: Linux, Unix-like systems, Windows, macOS
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when using FTP protocol with Kerberos authentication enabled. HTTP/HTTPS and other protocols are not affected.

📦 What is this software?

Curl by Haxx

curl is a command-line tool and library for transferring data with URLs. It supports numerous protocols including HTTP, HTTPS, FTP, and more, making it essential for API testing, web scraping, and automated data transfers.

Learn more about Curl →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or persistent backdoor installation.

🟠

Likely Case

Application crash causing denial of service, potentially leading to service disruption.

🟢

If Mitigated

Limited impact with proper network segmentation and minimal exposure of vulnerable systems.

🌐 Internet-Facing: HIGH - cURL is widely used for web requests and FTP operations, making internet-facing systems prime targets.
🏢 Internal Only: MEDIUM - Internal systems using cURL for FTP with Kerberos could be exploited through lateral movement.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires triggering the double-free condition through crafted FTP responses during Kerberos authentication.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: cURL 7.66.0

Vendor Advisory: https://curl.haxx.se/docs/CVE-2019-5481.html

Restart Required: Yes

Instructions:

1. Update cURL to version 7.66.0 or later. 2. For Linux distributions, use package manager: 'sudo apt update && sudo apt upgrade curl' (Debian/Ubuntu) or 'sudo yum update curl' (RHEL/CentOS). 3. Recompile applications using libcurl if statically linked. 4. Restart affected services.

🔧 Temporary Workarounds

Disable FTP Kerberos

all

Disable Kerberos authentication for FTP operations in cURL configurations.

curl --disable ftp-kerberos

Network Restriction

all

Block FTP connections to untrusted servers at firewall level.

🧯 If You Can't Patch

  • Disable FTP protocol usage entirely in affected applications
  • Implement strict network segmentation to isolate systems using vulnerable cURL versions

🔍 How to Verify

Check if Vulnerable:

Check cURL version: 'curl --version'. If version is between 7.52.0 and 7.65.3 inclusive, system is vulnerable if using FTP with Kerberos.

Check Version:

curl --version | head -1

Verify Fix Applied:

Verify cURL version is 7.66.0 or later: 'curl --version | head -1'. Test FTP with Kerberos functionality remains operational.

📡 Detection & Monitoring

Log Indicators:

  • Multiple free() calls on same memory address in cURL logs
  • Application crashes during FTP Kerberos authentication
  • Unexpected memory allocation patterns

Network Indicators:

  • FTP connections to unexpected servers
  • Unusual FTP authentication attempts with Kerberos

SIEM Query:

source="*curl*" AND ("double free" OR "FTP" AND "kerberos")

🔗 References

📤 Share & Export