CVE-2021-41459

7.5 HIGH

📋 TL;DR

This vulnerability is a stack buffer overflow in MP4Box v1.0.1 that allows attackers to cause denial of service by crashing the application. It affects systems running vulnerable versions of GPAC's MP4Box multimedia processing tool. The overflow occurs when processing specially crafted XML data in the nhmldmx_send_sample() function.

💻 Affected Systems

Products:
  • GPAC MP4Box
Versions: v1.0.1 and possibly earlier versions
Operating Systems: Linux, Windows, macOS, Unix-like systems
Default Config Vulnerable: ⚠️ Yes
Notes: Any system using MP4Box to process untrusted media files is vulnerable. The vulnerability is in the NHML demuxer component.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise if combined with other vulnerabilities or memory corruption techniques.

🟠

Likely Case

Application crash causing denial of service, potentially disrupting media processing workflows.

🟢

If Mitigated

Limited to application crash with no further system impact if proper sandboxing and privilege separation are implemented.

🌐 Internet-Facing: MEDIUM - MP4Box is typically used for media processing rather than as an internet-facing service, but could be exposed via web applications.
🏢 Internal Only: MEDIUM - Internal media processing systems could be disrupted, affecting business operations.

🎯 Exploit Status

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

Proof of concept exists in GitHub issues. Exploitation requires feeding a specially crafted MP4 file to MP4Box.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: GPAC versions after the fix in commit 8a1b1b8

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

Restart Required: No

Instructions:

1. Update GPAC to latest version from official repository. 2. Recompile MP4Box if using source. 3. Verify fix by checking version.

🔧 Temporary Workarounds

Disable NHML demuxer

all

Prevent MP4Box from using the vulnerable NHML demuxer component

mp4box -no-nhml input.mp4

Input validation

all

Validate and sanitize all input files before processing with MP4Box

🧯 If You Can't Patch

  • Isolate MP4Box in a container or sandbox with minimal privileges
  • Implement strict file upload controls and scan all media files before processing

🔍 How to Verify

Check if Vulnerable:

Check if MP4Box version is 1.0.1 or earlier, or if GPAC commit is before 8a1b1b8

Check Version:

mp4box -version

Verify Fix Applied:

Test with known malicious MP4 file that triggers the overflow - application should not crash

📡 Detection & Monitoring

Log Indicators:

  • MP4Box crash logs
  • segmentation fault errors
  • core dumps from MP4Box process

Network Indicators:

  • Unusual media file uploads to systems running MP4Box

SIEM Query:

process_name="mp4box" AND (event_type="crash" OR exit_code="139")

🔗 References

📤 Share & Export