CVE-2021-21842

8.8 HIGH

📋 TL;DR

This vulnerability allows remote code execution through a specially crafted MPEG-4 video file. Attackers can exploit an integer overflow in GPAC's MPEG-4 decoder to cause heap corruption and execute arbitrary code. Users and applications that process MPEG-4 files with the vulnerable GPAC library are affected.

💻 Affected Systems

Products:
  • GPAC Project on Advanced Content library
  • Applications using GPAC library for MPEG-4 processing
Versions: v1.0.1 and earlier
Operating Systems: Linux, Windows, macOS, Other Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Any application that uses GPAC to process MPEG-4 files is vulnerable. This includes media players, video editors, and web applications that handle video uploads.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with remote code execution, potentially leading to data theft, ransomware deployment, or persistent backdoor installation.

🟠

Likely Case

Application crash leading to denial of service, with potential for remote code execution in targeted attacks.

🟢

If Mitigated

Application crash without code execution if memory protections (ASLR, DEP) are effective.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires user interaction to open a malicious video file. The vulnerability is well-documented with technical details available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v1.0.2 and later

Vendor Advisory: https://github.com/gpac/gpac/security/advisories/GHSA-xxxx-xxxx-xxxx

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 file processing 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 potential damage from exploitation
  • Use memory protection mechanisms (ASLR, DEP) and monitor for crash events

🔍 How to Verify

Check if Vulnerable:

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

Check Version:

gpac -version 2>/dev/null | head -1

Verify Fix Applied:

Verify GPAC version is 1.0.2 or later and test with known malicious MPEG-4 samples

📡 Detection & Monitoring

Log Indicators:

  • Application crashes when processing MPEG-4 files
  • Memory access violation errors
  • Unexpected process termination

Network Indicators:

  • Unusual MPEG-4 file downloads
  • Video file uploads to web applications

SIEM Query:

source="application_logs" AND ("segmentation fault" OR "access violation" OR "heap corruption") AND process="*gpac*"

🔗 References

📤 Share & Export