CVE-2020-20896
📋 TL;DR
A null pointer dereference vulnerability in FFmpeg's latm_write_packet function allows attackers to cause denial of service or potentially execute arbitrary code by processing malicious media files. This affects systems using FFmpeg 4.2.1 for media processing, including video streaming services, media converters, and applications with embedded FFmpeg libraries.
💻 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 null pointer dereference can be leveraged for memory corruption attacks.
Likely Case
Denial of service causing FFmpeg processes to crash when processing specially crafted media files.
If Mitigated
Isolated process crash with no privilege escalation if proper sandboxing and privilege separation are implemented.
🎯 Exploit Status
Exploitation requires crafting a malicious media file that triggers the null pointer dereference. No public exploit code has been released.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in commit dd01947397b98e94c3f2a79d5820aaf4594f4d3b and later versions
Vendor Advisory: https://trac.ffmpeg.org/ticket/8273
Restart Required: Yes
Instructions:
1. Update FFmpeg to version 4.2.2 or later. 2. Rebuild any applications using FFmpeg libraries. 3. Restart services using FFmpeg.
🔧 Temporary Workarounds
Disable LATM audio processing
allConfigure FFmpeg to avoid processing LATM audio streams which trigger the vulnerability
ffmpeg -acodec copy -vcodec copy -f null -
Input validation filtering
allImplement file type validation to reject suspicious media files before FFmpeg processing
🧯 If You Can't Patch
- Implement strict input validation and sanitization for all media files processed by FFmpeg
- Run FFmpeg in isolated containers or sandboxes with minimal privileges to limit impact
🔍 How to Verify
Check if Vulnerable:
Check FFmpeg version with 'ffmpeg -version' and verify if it's 4.2.1. Also check if the commit hash matches pre-patch versions.
Check Version:
ffmpeg -version | head -1
Verify Fix Applied:
Verify FFmpeg version is 4.2.2 or later, or that the commit includes dd01947397b98e94c3f2a79d5820aaf4594f4d3b
📡 Detection & Monitoring
Log Indicators:
- FFmpeg process crashes with segmentation faults
- Error messages related to latm_write_packet or null pointer dereferences
Network Indicators:
- Unusual media file uploads to systems using FFmpeg
- Multiple failed media processing attempts
SIEM Query:
process.name:ffmpeg AND (event.action:crash OR error.message:*null* OR error.message:*segmentation*)