CVE-2020-8285

7.5 HIGH

📋 TL;DR

CVE-2020-8285 is a stack overflow vulnerability in curl's FTP wildcard parsing that allows remote attackers to crash applications or potentially execute arbitrary code via malicious FTP server responses. It affects curl versions 7.21.0 through 7.73.0 when using FTP with wildcard matching. Any application or system using vulnerable curl versions for FTP operations is at risk.

💻 Affected Systems

Products:
  • curl
  • libcurl
  • any software using libcurl
Versions: 7.21.0 to 7.73.0 inclusive
Operating Systems: All platforms where curl is installed
Default Config Vulnerable: ⚠️ Yes
Notes: Only vulnerable when using FTP protocol with wildcard matching (e.g., using -O or --remote-name with FTP URLs containing wildcards).

📦 What is this software?

Macos by Apple

macOS is Apple's desktop and laptop operating system powering Mac computers used by millions of professionals, developers, creative professionals, and enterprise users worldwide. Built on a Unix foundation with the Darwin kernel and modern Cocoa frameworks, macOS delivers a seamless ecosystem integr...

Learn more about Macos →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise if the stack overflow can be leveraged for arbitrary code execution.

🟠

Likely Case

Denial of service through application crash when connecting to malicious FTP servers with crafted wildcard responses.

🟢

If Mitigated

Limited impact if FTP functionality is disabled or if network controls prevent connections to untrusted FTP servers.

🌐 Internet-Facing: MEDIUM - Requires connecting to malicious FTP servers, which is less common than HTTP attacks but still plausible.
🏢 Internal Only: LOW - Internal FTP servers are typically trusted, reducing attack surface significantly.

🎯 Exploit Status

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

Exploitation requires the victim to connect to a malicious FTP server, which can be achieved through phishing or compromised legitimate servers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: curl 7.74.0

Vendor Advisory: https://curl.se/docs/CVE-2020-8285.html

Restart Required: Yes

Instructions:

1. Update curl to version 7.74.0 or later. 2. For Linux systems: Use package manager (apt-get upgrade curl, yum update curl, etc.). 3. For Windows: Download latest version from curl.se. 4. Restart any services or applications using libcurl.

🔧 Temporary Workarounds

Disable FTP wildcard matching

all

Prevent curl from using wildcard matching in FTP operations

curl --disable ftp_wildcard

Block untrusted FTP connections

linux

Use firewall rules to restrict FTP connections to trusted servers only

iptables -A OUTPUT -p tcp --dport 21 -d trusted_ftp_server -j ACCEPT
iptables -A OUTPUT -p tcp --dport 21 -j DROP

🧯 If You Can't Patch

  • Disable FTP functionality entirely in applications using curl
  • Implement network segmentation to isolate systems using vulnerable curl versions

🔍 How to Verify

Check if Vulnerable:

Run 'curl --version' and check if version is between 7.21.0 and 7.73.0

Check Version:

curl --version | head -1

Verify Fix Applied:

After update, run 'curl --version' to confirm version is 7.74.0 or higher

📡 Detection & Monitoring

Log Indicators:

  • Multiple curl crashes with segmentation faults
  • Unexpected termination of applications using libcurl

Network Indicators:

  • Outbound FTP connections to unknown or suspicious servers
  • FTP connections followed by application crashes

SIEM Query:

source="*curl*" AND ("segmentation fault" OR "stack overflow" OR "SIGSEGV")

🔗 References

📤 Share & Export