Skip to main content
Vulnerability Database/CVE-2025-60490

CVE-2025-60490: GPAC MP4Box Use-After-Free Vulnerability

CVE-2025-60490 is a heap use-after-free vulnerability in GPAC MP4Box that enables attackers to trigger denial of service by processing malicious MP4 files. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2025-60490 Overview

CVE-2025-60490 is a heap use-after-free vulnerability in the gf_filter_pid_send_event_downstream function located in src/filter_core/filter_pid.c of the GPAC multimedia framework. The flaw affects GPAC Project and the MP4Box utility in versions prior to 2.5. An attacker can trigger the condition by supplying a crafted MP4 file to a vulnerable MP4Box instance, causing memory corruption that results in a Denial of Service (DoS). GPAC is widely deployed as a reference multimedia tool for packaging, muxing, and analyzing MP4 and other container formats, which increases exposure for media processing pipelines and automated transcoding workflows.

Critical Impact

Processing a malicious MP4 file with a vulnerable MP4Box build triggers a heap use-after-free, crashing the process and disrupting multimedia workflows.

Affected Products

  • GPAC Project versions prior to 2.5
  • MP4Box utility prior to 2.5
  • Applications and services embedding the GPAC filter_core library before version 2.5

Discovery Timeline

  • 2026-10-21 - CVE-2025-60490 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2025-60490

Vulnerability Analysis

The vulnerability is a heap use-after-free [CWE-416] in the GPAC filter pipeline. When gf_filter_pid_send_event_downstream iterates over input PIDs during event dispatch, it accesses a GF_FilterPidInst structure whose underlying PID may already be in the process of being swapped out as part of a filter chain reconfiguration. Dereferencing the freed PID instance leads to memory corruption and process termination.

The condition is reachable through standard MP4Box operations on attacker-supplied media. Because GPAC is routinely invoked in server-side media processing, batch transcoding, and content ingestion pipelines, a single malformed MP4 file can halt automated jobs or crash analysis tooling.

Root Cause

The root cause is missing validation of the swap_source state on a GF_FilterPidInst before the function propagates events downstream. During a chain swap, the PID instance is scheduled for removal, but the event dispatch loop continues to use the stale pointer. The upstream fix adds an early continue when pid_inst->swap_source is set, preventing further access to the soon-to-be-freed object.

Attack Vector

Exploitation requires an attacker to deliver a specially crafted MP4 container that triggers filter chain reconfiguration while events are in flight. The attack is local to the parsing process but can be remote in effect when MP4Box or GPAC libraries are exposed through upload endpoints, media conversion services, or scripted content pipelines. No authentication is required beyond the ability to submit a file to the vulnerable processor.

c
// Upstream patch in src/filter_core/filter_pid.c
 GF_FilterPidInst *pid_inst = gf_list_get(f->input_pids, i);
 GF_FilterPid *pid = pid_inst->pid;
 if (!pid) continue;
+ //PID instance is about to be removed due to chain swap, ignore event
+ if (pid_inst->swap_source)
+     continue;

 if (dispatched_filters) {
     if (gf_list_find(dispatched_filters, pid_inst->pid->filter) >=0 )
// Source: [GPAC commit d0793f9](https://github.com/gpac/gpac/commit/d0793f92e04fe284a25c2a9335cc5edc68deb6d4)

Detection Methods for CVE-2025-60490

Indicators of Compromise

  • Repeated MP4Box or GPAC-based service crashes correlated with incoming MP4 uploads or batch inputs.
  • Core dumps or stack traces referencing gf_filter_pid_send_event_downstream or filter_pid.c.
  • AddressSanitizer or glibc heap-use-after-free diagnostics emitted by GPAC processes.

Detection Strategies

  • Inventory hosts running GPAC and verify MP4Box -version output against version 2.5 or later.
  • Alert on abnormal termination of media processing workers that handle untrusted MP4 inputs.
  • Monitor container registries and build pipelines for images that bundle vulnerable GPAC releases.

Monitoring Recommendations

  • Capture process exit codes and signals (SIGSEGV, SIGABRT) for all media conversion jobs.
  • Centralize media worker logs and crash telemetry for correlation across ingestion pipelines.
  • Track file hashes of MP4 inputs that preceded any observed GPAC crash for forensic review.

How to Mitigate CVE-2025-60490

Immediate Actions Required

  • Upgrade GPAC and MP4Box to version 2.5 or later across all workstations, servers, and container images.
  • Quarantine untrusted MP4 submissions until the patched version is deployed.
  • Rebuild internal tools and services that statically link GPAC libraries against the fixed release.

Patch Information

The fix is included in GPAC 2.5. The relevant upstream change is commit d0793f9, which adds a swap_source check in gf_filter_pid_send_event_downstream to skip PID instances scheduled for removal. See the related GPAC issue #3315 and the public proof-of-concept documentation for reproduction details.

Workarounds

  • Run MP4Box in sandboxed or ephemeral containers with strict resource and restart policies to limit DoS impact.
  • Pre-validate MP4 uploads with structural checks and size limits before passing them to GPAC.
  • Disable or restrict GPAC-based processing of files from untrusted sources until patching is complete.
bash
# Verify installed GPAC version and upgrade from source
MP4Box -version

git clone https://github.com/gpac/gpac.git
cd gpac
git checkout v2.5
./configure && make -j$(nproc)
sudo make install

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.