CVE-2020-12284

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary code or cause denial of service via a specially crafted JPEG file. It affects systems running FFmpeg 4.1 or 4.2.2 that process untrusted JPEG content.

💻 Affected Systems

Products:
  • FFmpeg
Versions: 4.1 and 4.2.2
Operating Systems: Linux, Windows, macOS, BSD
Default Config Vulnerable: ⚠️ Yes
Notes: Any system using FFmpeg to process JPEG files is vulnerable. Embedded systems and media servers are particularly at risk.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Application crash causing denial of service, potentially disrupting media processing services.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing, potentially just application crashes.

🌐 Internet-Facing: HIGH - FFmpeg is commonly used in web services processing user-uploaded media files.
🏢 Internal Only: MEDIUM - Internal systems processing media files could be exploited via phishing or compromised files.

🎯 Exploit Status

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

The vulnerability was discovered through fuzzing and has public proof-of-concept available. Exploitation requires only a malicious JPEG file.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FFmpeg 4.2.3 or later, or apply commits 1812352d767ccf5431aa440123e2e260a4db2726 and a3a3730b5456ca00587455004d40c047f7b20a99

Vendor Advisory: https://security.gentoo.org/glsa/202007-58

Restart Required: Yes

Instructions:

1. Update FFmpeg to version 4.2.3 or later. 2. For source installations, apply the two referenced commits. 3. Restart any services using FFmpeg.

🔧 Temporary Workarounds

Disable JPEG processing

all

Temporarily disable JPEG file processing in FFmpeg configurations

Configure FFmpeg to reject JPEG files or use alternative codecs

Sandbox FFmpeg execution

linux

Run FFmpeg in a container or sandbox with limited privileges

docker run --security-opt no-new-privileges -v /media:/media ffmpeg
firejail --private ffmpeg

🧯 If You Can't Patch

  • Implement strict input validation to reject malformed JPEG files before processing
  • Deploy network segmentation to isolate FFmpeg services from critical systems

🔍 How to Verify

Check if Vulnerable:

Check FFmpeg version: ffmpeg -version | grep 'version'

Check Version:

ffmpeg -version | head -1

Verify Fix Applied:

Verify version is 4.2.3 or later, or check if commits are applied in source installations

📡 Detection & Monitoring

Log Indicators:

  • FFmpeg segmentation faults
  • Heap corruption errors
  • Abnormal process termination

Network Indicators:

  • Unusual outbound connections from FFmpeg processes
  • Large JPEG file uploads to media processing endpoints

SIEM Query:

process.name:ffmpeg AND (event.action:segfault OR event.action:abnormal_exit)

🔗 References

📤 Share & Export