CVE-2022-48434
📋 TL;DR
This vulnerability in FFmpeg's libavcodec allows attackers to trigger a use-after-free condition in worker threads when processing certain video files, potentially leading to arbitrary code execution. It affects FFmpeg before version 5.1.2 and products that incorporate it, including VLC media player. The exploit requires specific conditions like hardware re-initialization during video playback with Direct3D11.
💻 Affected Systems
- FFmpeg
- VLC media player
- Other products using vulnerable FFmpeg libraries
📦 What is this software?
Ffmpeg by Ffmpeg
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the application processing the video, potentially leading to full system compromise.
Likely Case
Application crash or denial of service when processing specially crafted video files.
If Mitigated
No impact if patched or if vulnerable code paths are not triggered.
🎯 Exploit Status
Exploitation requires specific hardware acceleration conditions and crafted video files, making reliable exploitation non-trivial.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: FFmpeg 5.1.2 and later
Vendor Advisory: https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/cc867f2c09d2b69cee8a0eccd62aff002cbbfe11
Restart Required: Yes
Instructions:
1. Update FFmpeg to version 5.1.2 or later. 2. Update VLC to a version that includes the patched FFmpeg library. 3. Restart affected applications and services.
🔧 Temporary Workarounds
Disable hardware acceleration
allPrevents triggering the vulnerability by avoiding hardware-accelerated video decoding.
In VLC: Tools > Preferences > Input/Codecs > Hardware-accelerated decoding > Disable
Block untrusted video files
allPrevent processing of potentially malicious video files from untrusted sources.
🧯 If You Can't Patch
- Implement strict file upload controls to block potentially malicious video files.
- Isolate media processing applications in restricted environments or containers.
🔍 How to Verify
Check if Vulnerable:
Check FFmpeg version with 'ffmpeg -version' and verify it's below 5.1.2.
Check Version:
ffmpeg -version | grep 'ffmpeg version'
Verify Fix Applied:
Confirm FFmpeg version is 5.1.2 or later with 'ffmpeg -version'.
📡 Detection & Monitoring
Log Indicators:
- Application crashes or abnormal terminations when processing video files
- Memory access violation errors in application logs
Network Indicators:
- Unusual outbound connections from media processing applications
SIEM Query:
EventID=1000 OR EventID=1001 (Application crash) AND ProcessName contains 'vlc' OR 'ffmpeg'
🔗 References
- https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/cc867f2c09d2b69cee8a0eccd62aff002cbbfe11
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KOMB6WRUC55VWV25IKJTV22KARBUGWGQ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PQHNSWXFUN3VJ3AO2AEJUK3BURSGM5G2/
- https://news.ycombinator.com/item?id=35356201
- https://security.gentoo.org/glsa/202312-14
- https://wrv.github.io/h26forge.pdf
- https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/cc867f2c09d2b69cee8a0eccd62aff002cbbfe11
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KOMB6WRUC55VWV25IKJTV22KARBUGWGQ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PQHNSWXFUN3VJ3AO2AEJUK3BURSGM5G2/
- https://news.ycombinator.com/item?id=35356201
- https://security.gentoo.org/glsa/202312-14
- https://wrv.github.io/h26forge.pdf