CVE-2024-6064

5.3 MEDIUM

📋 TL;DR

This vulnerability in GPAC's MP4Box tool is a use-after-free flaw in the xmt_node_end function that could allow local attackers to crash the application or potentially execute arbitrary code. It affects GPAC 2.5-DEV-rev228-g11067ea92-master and requires local access to exploit. Users who process untrusted XMT/MP4 files with MP4Box are at risk.

💻 Affected Systems

Products:
  • GPAC MP4Box
Versions: GPAC 2.5-DEV-rev228-g11067ea92-master (development version)
Operating Systems: All platforms where GPAC is installed
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects MP4Box when processing XMT files. Other GPAC components are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation leading to arbitrary code execution with the privileges of the MP4Box process.

🟠

Likely Case

Application crash (denial of service) when processing malicious XMT files.

🟢

If Mitigated

No impact if MP4Box is not used or if untrusted files are not processed.

🌐 Internet-Facing: LOW - Requires local access, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users could exploit if they can run MP4Box on vulnerable systems.

🎯 Exploit Status

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

Proof-of-concept exploit is publicly available in the GitHub issue. Requires local access and ability to run MP4Box with malicious input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in commit c1b9c794bad8f262c56f3cf690567980d96662f5

Vendor Advisory: https://github.com/gpac/gpac/issues/2874

Restart Required: No

Instructions:

1. Update GPAC to latest version with commit c1b9c794bad8f262c56f3cf690567980d96662f5. 2. Rebuild from source if using development version. 3. For packaged versions, wait for updated package from your distribution.

🔧 Temporary Workarounds

Disable MP4Box XMT processing

linux

Remove or restrict MP4Box execution for untrusted users

chmod 750 /usr/bin/MP4Box
setfacl -m u:untrusteduser:--- /usr/bin/MP4Box

Sandbox MP4Box execution

all

Run MP4Box in container or sandbox when processing untrusted files

docker run --rm -v $(pwd):/data gpac mp4box [options]

🧯 If You Can't Patch

  • Restrict local user access to systems running vulnerable GPAC versions
  • Implement strict file validation before processing XMT files with MP4Box

🔍 How to Verify

Check if Vulnerable:

Check GPAC version: mp4box -version | grep 'version' and verify if it's before commit c1b9c794bad8f262c56f3cf690567980d96662f5

Check Version:

mp4box -version 2>&1 | head -5

Verify Fix Applied:

Verify commit hash in build: strings /usr/bin/MP4Box | grep c1b9c794bad8f262c56f3cf690567980d96662f5

📡 Detection & Monitoring

Log Indicators:

  • MP4Box segmentation faults
  • Abnormal termination of MP4Box processes

Network Indicators:

  • None - local exploitation only

SIEM Query:

process_name:"MP4Box" AND (event_type:"crash" OR exit_code:139)

🔗 References

📤 Share & Export