CVE-2020-20892
📋 TL;DR
A division by zero vulnerability in FFmpeg's lens correction filter allows attackers to cause denial of service or potentially execute arbitrary code by processing specially crafted video files. This affects systems running FFmpeg 4.2.1 that use the lens correction filter. Media processing servers, video editing software, and applications embedding FFmpeg are at risk.
💻 Affected Systems
- FFmpeg
📦 What is this software?
Ffmpeg by Ffmpeg
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise if the division by zero triggers memory corruption that can be weaponized.
Likely Case
Denial of service causing FFmpeg process crashes when processing malicious video files, disrupting media processing services.
If Mitigated
Process isolation limits impact to the FFmpeg instance; proper input validation prevents exploitation.
🎯 Exploit Status
Exploitation requires crafting a malicious video file that triggers the division by zero when processed with lens correction filter.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in FFmpeg commit 19587c9332f5be4f6bc6d7b2b8ef3fd21dfeaa01 and later versions
Vendor Advisory: https://trac.ffmpeg.org/ticket/8265
Restart Required: Yes
Instructions:
1. Update FFmpeg to version 4.2.2 or later. 2. Rebuild from source with the fix commit. 3. Restart all services using FFmpeg.
🔧 Temporary Workarounds
Disable lens correction filter
allPrevent use of the vulnerable vf_lenscorrection filter in FFmpeg commands
Avoid using '-vf lenscorrection' in FFmpeg commands
Input validation
allValidate all input media files before processing with FFmpeg
Implement file type validation and sanitization before FFmpeg processing
🧯 If You Can't Patch
- Isolate FFmpeg processes in containers or sandboxes to limit blast radius
- Implement strict access controls to prevent untrusted users from submitting media for processing
🔍 How to Verify
Check if Vulnerable:
Check FFmpeg version: ffmpeg -version | grep 'version' and verify if it's 4.2.1. Also check if lenscorrection filter is available: ffmpeg -filters | grep lenscorrection
Check Version:
ffmpeg -version | head -1
Verify Fix Applied:
Verify FFmpeg version is 4.2.2 or later, or check git commit contains 19587c9332f5be4f6bc6d7b2b8ef3fd21dfeaa01
📡 Detection & Monitoring
Log Indicators:
- FFmpeg process crashes with segmentation fault
- Error logs containing 'division by zero' or lenscorrection filter errors
Network Indicators:
- Unusual media file uploads to processing endpoints
- Repeated failed media processing requests
SIEM Query:
process.name:ffmpeg AND (event.action:crash OR log.message:"*division by zero*")