CVE-2020-22029

8.8 HIGH

📋 TL;DR

This is a heap-based buffer overflow vulnerability in FFmpeg's colorconstancy filter that allows attackers to cause memory corruption by processing specially crafted video files. It affects FFmpeg 4.2 installations that use the colorconstancy filter. Successful exploitation could lead to arbitrary code execution or denial of service.

💻 Affected Systems

Products:
  • FFmpeg
Versions: FFmpeg 4.2
Operating Systems: All platforms running vulnerable FFmpeg versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using the colorconstancy filter (vf_colorconstancy). Many FFmpeg installations may not use this specific filter.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the FFmpeg process, potentially leading to complete system compromise.

🟠

Likely Case

Application crash (denial of service) when processing malicious video files.

🟢

If Mitigated

No impact if the vulnerable filter is disabled or patched versions are used.

🌐 Internet-Facing: MEDIUM - Exploitation requires processing attacker-controlled video files, which could occur through user uploads or media processing services.
🏢 Internal Only: LOW - Requires local access or internal systems processing untrusted video content.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting a malicious video file that triggers the buffer overflow when processed with the vulnerable filter.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in commit a7fd1279703683ebb548ef7baa2f1519994496ae and later versions

Vendor Advisory: https://www.debian.org/security/2021/dsa-4990

Restart Required: No

Instructions:

1. Update FFmpeg to version 4.2.3 or later. 2. For source installations: apply commit a7fd1279703683ebb548ef7baa2f1519994496ae. 3. Recompile if using source build.

🔧 Temporary Workarounds

Disable colorconstancy filter

all

Prevent use of the vulnerable filter in FFmpeg commands

Avoid using '-vf colorconstancy' in FFmpeg commands

Input validation

all

Validate and sanitize video file inputs before processing

🧯 If You Can't Patch

  • Disable or restrict use of FFmpeg's colorconstancy filter in all applications
  • Implement strict input validation for video files and use sandboxing for FFmpeg processes

🔍 How to Verify

Check if Vulnerable:

Check FFmpeg version: ffmpeg -version | grep 'version' and verify if it's 4.2.x. Also check if colorconstancy filter is available: ffmpeg -filters | grep colorconstancy

Check Version:

ffmpeg -version | head -1

Verify Fix Applied:

Verify FFmpeg version is 4.2.3 or later, or check git commit hash includes a7fd1279703683ebb548ef7baa2f1519994496ae

📡 Detection & Monitoring

Log Indicators:

  • FFmpeg process crashes with segmentation faults
  • Memory corruption errors in system logs when processing video files

Network Indicators:

  • Unusual video file uploads to media processing services
  • Large number of failed video processing requests

SIEM Query:

Process:ffmpeg AND (EventID:1000 OR Signal:SIGSEGV) OR Process:ffmpeg AND CommandLine:"*colorconstancy*"

🔗 References

📤 Share & Export