CVE-2021-21847

8.8 HIGH

📋 TL;DR

This vulnerability allows remote code execution through a heap-based buffer overflow in GPAC's MPEG-4 decoder. Attackers can exploit it by tricking users into opening malicious video files. Systems using GPAC v1.0.1 for video processing are affected.

💻 Affected Systems

Products:
  • GPAC Project on Advanced Content library
Versions: v1.0.1
Operating Systems: Linux, Windows, macOS
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using GPAC library for MPEG-4 decoding is vulnerable. This includes media players, video editors, and web applications that process video content.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with arbitrary code execution leading to complete data loss, lateral movement, and persistent backdoor installation.

🟠

Likely Case

Application crash leading to denial of service, with potential for limited code execution in the context of the video processing application.

🟢

If Mitigated

Application crash without code execution if memory protections like ASLR/DEP are properly implemented and effective.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: LOW

🎯 Exploit Status

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

Exploitation requires user interaction to open malicious video file. The vulnerability is in the 'stts' atom decoder within MPEG-4 parsing functionality.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.0.2 or later

Vendor Advisory: https://github.com/gpac/gpac/security/advisories

Restart Required: Yes

Instructions:

1. Update GPAC library to version 1.0.2 or later. 2. Rebuild any applications using GPAC. 3. Restart affected services or applications.

🔧 Temporary Workarounds

Disable MPEG-4 processing

all

Configure applications to disable MPEG-4 video decoding if not required

Input validation

all

Implement strict file type validation and size limits for video uploads

🧯 If You Can't Patch

  • Implement application sandboxing to limit impact of potential exploitation
  • Deploy endpoint detection and response (EDR) solutions to monitor for exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check GPAC library version: gpac -version or examine linked library version in applications

Check Version:

gpac -version 2>&1 | grep -i version

Verify Fix Applied:

Confirm GPAC version is 1.0.2 or higher and verify applications have been rebuilt with updated library

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults in video processing
  • Unusual memory allocation patterns in video decoding processes

Network Indicators:

  • Unexpected video file downloads to systems running GPAC
  • MPEG-4 files with unusual structure or size

SIEM Query:

process_name:"gpac" AND (event_type:crash OR memory_usage:anomalous)

🔗 References

📤 Share & Export