CVE-2019-17539

9.8 CRITICAL

📋 TL;DR

This vulnerability in FFmpeg before version 4.2 allows a NULL pointer dereference in the avcodec_open2 function, potentially leading to crashes, denial of service, or arbitrary code execution. It affects systems and applications that use vulnerable FFmpeg libraries for media processing. Users of FFmpeg-based software, such as media players, streaming services, or video editing tools, are at risk.

💻 Affected Systems

Products:
  • FFmpeg
  • Software using FFmpeg libraries (e.g., VLC, HandBrake, streaming servers)
Versions: FFmpeg versions before 4.2
Operating Systems: Linux, Windows, macOS, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Any application or system that uses the vulnerable FFmpeg library for decoding media is affected, regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Exploitation could result in remote code execution, allowing an attacker to take full control of the affected system, potentially leading to data theft, system compromise, or further network propagation.

🟠

Likely Case

Most probable impact is denial of service, causing application crashes or instability when processing malicious media files, disrupting media services or user applications.

🟢

If Mitigated

With proper controls like input validation and sandboxing, the impact may be limited to localized crashes or reduced functionality, preventing broader system compromise.

🌐 Internet-Facing: HIGH, as FFmpeg is commonly used in web applications and services that process user-uploaded media, making it accessible to remote attackers.
🏢 Internal Only: MEDIUM, as internal systems using FFmpeg for media processing could be exploited via malicious files, but exposure is more limited compared to internet-facing services.

🎯 Exploit Status

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

Exploitation involves crafting a malicious media file to trigger the NULL pointer dereference; public proof-of-concept details are available in the linked references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: FFmpeg 4.2 and later

Vendor Advisory: https://github.com/FFmpeg/FFmpeg/commit/8df6884832ec413cf032dfaa45c23b1c7876670c

Restart Required: Yes

Instructions:

1. Update FFmpeg to version 4.2 or later using your package manager (e.g., apt-get upgrade ffmpeg on Debian/Ubuntu). 2. Recompile any custom applications with the updated FFmpeg libraries. 3. Restart services or applications that use FFmpeg to apply the fix.

🔧 Temporary Workarounds

Disable vulnerable codec usage

all

Temporarily disable or restrict the use of codecs that trigger the avcodec_open2 function in FFmpeg-based applications.

Configure application settings to avoid processing untrusted media files or use alternative libraries.

🧯 If You Can't Patch

  • Implement strict input validation to reject or sanitize media files from untrusted sources.
  • Isolate FFmpeg processes in sandboxed environments or containers to limit potential damage from exploitation.

🔍 How to Verify

Check if Vulnerable:

Run 'ffmpeg -version' and check if the version is below 4.2; also, inspect application dependencies for vulnerable FFmpeg libraries.

Check Version:

ffmpeg -version | grep 'ffmpeg version'

Verify Fix Applied:

After updating, run 'ffmpeg -version' to confirm version 4.2 or higher, and test with known malicious media files to ensure no crashes occur.

📡 Detection & Monitoring

Log Indicators:

  • Application crashes or segmentation faults in logs related to FFmpeg processes
  • Error messages mentioning avcodec_open2 or NULL pointer dereference

Network Indicators:

  • Unusual media file uploads or processing requests to FFmpeg-based services
  • Increased error rates in media streaming or conversion endpoints

SIEM Query:

Example: search for 'ffmpeg' AND ('segmentation fault' OR 'NULL pointer') in application logs over the past 24 hours.

🔗 References

📤 Share & Export