CVE-2024-36617

6.2 MEDIUM

📋 TL;DR

CVE-2024-36617 is an integer overflow vulnerability in FFmpeg's CAF decoder that could allow attackers to cause denial of service or potentially execute arbitrary code by processing specially crafted CAF audio files. This affects systems running FFmpeg n6.1.1 that process untrusted CAF files. Users and applications that decode CAF audio files are at risk.

💻 Affected Systems

Products:
  • FFmpeg
Versions: n6.1.1 specifically (commit before d973fcbcc2f944752ff10e6a76b0b2d9329937a7)
Operating Systems: All platforms running vulnerable FFmpeg version
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects CAF (Core Audio Format) file decoding functionality. Other codecs and formats are not impacted.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise if the integer overflow enables memory corruption that can be weaponized.

🟠

Likely Case

Denial of service through application crashes or hangs when processing malicious CAF files.

🟢

If Mitigated

Limited impact with proper input validation and sandboxing, potentially just failed file processing.

🌐 Internet-Facing: MEDIUM - Risk exists if FFmpeg processes user-uploaded CAF files, but requires specific file format targeting.
🏢 Internal Only: LOW - Primarily affects media processing workflows rather than general system operations.

🎯 Exploit Status

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

Exploitation requires crafting a malicious CAF file that triggers the integer overflow. Public PoC exists in the gist reference.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit d973fcbcc2f944752ff10e6a76b0b2d9329937a7 and later

Vendor Advisory: https://github.com/ffmpeg/ffmpeg/commit/d973fcbcc2f944752ff10e6a76b0b2d9329937a7

Restart Required: No

Instructions:

1. Update FFmpeg to version after commit d973fcbcc2f944752ff10e6a76b0b2d9329937a7. 2. Rebuild from source or use updated package from your distribution. 3. Replace existing FFmpeg binaries with patched version.

🔧 Temporary Workarounds

Disable CAF decoder

all

Remove or disable CAF format support in FFmpeg to prevent processing of CAF files

ffmpeg -formats | grep caf
# Recompile FFmpeg without CAF support if possible

Input validation

linux

Implement file type validation before processing with FFmpeg

# Add pre-processing check: file --mime-type input.caf | grep -v 'audio/x-caf'

🧯 If You Can't Patch

  • Implement strict input validation for CAF files before processing with FFmpeg
  • Run FFmpeg in sandboxed/containerized environments with limited privileges

🔍 How to Verify

Check if Vulnerable:

Check FFmpeg version and commit hash: ffmpeg -version | grep 'version\|commit'

Check Version:

ffmpeg -version | head -5

Verify Fix Applied:

Verify FFmpeg commit is d973fcbcc2f944752ff10e6a76b0b2d9329937a7 or later: ffmpeg -version | grep commit

📡 Detection & Monitoring

Log Indicators:

  • FFmpeg crashes with segmentation faults when processing CAF files
  • High CPU/memory usage during CAF file decoding

Network Indicators:

  • Unusual CAF file uploads to media processing services
  • Multiple failed CAF decoding attempts

SIEM Query:

process.name:"ffmpeg" AND (event.action:"segmentation fault" OR exit_code:139) AND process.args:"*.caf"

🔗 References

📤 Share & Export