CVE-2025-60466 Overview
CVE-2025-60466 is a use-after-free vulnerability in the gf_filter_pid_get_packet function located in src/filter_core/filter_pid.c of the GPAC multimedia framework. The flaw affects GPAC Project/MP4Box versions prior to 26.02.0. An attacker can trigger the condition by supplying a crafted media file to MP4Box, causing a denial of service through memory corruption. The vulnerability resides in the filter pipeline logic, specifically when a target filter or PID has been marked for removal while a task remains pending. Public proof-of-concept code and detailed reproduction steps are available in third-party repositories.
Critical Impact
Processing a crafted media file with a vulnerable MP4Box build results in a use-after-free condition, causing process crashes and denial of service in media transcoding or analysis workflows.
Affected Products
- GPAC Project MP4Box versions before 26.02.0
- GPAC multimedia framework filter core (src/filter_core/filter_pid.c)
- Applications and pipelines embedding the vulnerable GPAC library for media processing
Discovery Timeline
- 2026-06-25 - CVE-2025-60466 published to NVD
- 2026-06-25 - Last updated in NVD database
Technical Details for CVE-2025-60466
Vulnerability Analysis
The vulnerability is a use-after-free in the GPAC filter core. GPAC routes media data through a graph of filters connected by Packet Identifiers (PIDs). The gf_filter_pid_get_packet function retrieves the next packet from a PID's input queue. When a PID or its parent filter is marked for removal or finalization while a task referencing it remains queued, downstream code continues to access the freed PID and filter structures. The result is memory corruption that crashes the MP4Box process. Although the public impact is documented as denial of service, use-after-free conditions can carry broader consequences depending on heap state and allocator behavior.
Root Cause
The root cause is missing validation of object lifecycle state before dereferencing PID and filter pointers inside a posted task. The pre-patch code path did not check whether task->pid->pid->removed, task->filter->finalized, or task->filter->removed were set before proceeding. Detached PID instances were not cleaned up at the correct moment, leaving stale pointers that were dereferenced by gf_filter_pid_get_packet.
Attack Vector
Exploitation requires the victim to process an attacker-supplied media file with a vulnerable build of MP4Box or any application linked against the affected GPAC library. The crafted file triggers a specific sequence of filter graph reconfigurations that schedule tasks against PIDs slated for removal. No authentication or network position is needed beyond delivering the file to a target processing pipeline.
{
GF_Filter *filter = task->filter;
GF_FilterSession *fsess = filter->session;
+
+ /* special case: the target filter or pid has been marked for removal since the task was posted
+ ignore the task - if a pid swaping was in place, remove pid from filter and delete it
+ */
+ if (task->pid->pid->removed || task->filter->finalized || task->filter->removed) {
+ u32 i, count = gf_list_count(filter->detached_pid_inst);
+ for (i=0; i<count; i++) {
+ GF_FilterPidInst *pidinst = gf_list_get(filter->detached_pid_inst, i);
+ if (pidinst->filter !=filter) continue;
+ gf_list_rem(filter->detached_pid_inst, i);
+ //reattach new filter and pid
+ pidinst->filter = filter;
+ pidinst->pid = task->pid;
+ safe_int_dec(&pidinst->detach_pending);
+ //delete pid
+ filter->freg->configure_pid(filter, (GF_FilterPid*) pidinst, GF_TRUE);
+ gf_filter_pid_inst_del(pidinst);
+ break;
+ }
+ if (!gf_list_count(filter->detached_pid_inst)) {
+ gf_list_del(filter->detached_pid_inst);
+ filter->detached_pid_inst = NULL;
+ }
+ gf_assert(task->pid->filter->out_pid_connection_pending);
+ safe_int_dec(&task->pid->filter->out_pid_connection_pending);
+ return;
+ }
Source: GPAC commit 4a7ea06dd1b2cc65fe0dabc60189eb6bc814f7bb — the patch adds an early-return guard that checks removal and finalization flags before the task proceeds, and cleans up detached PID instances safely.
Detection Methods for CVE-2025-60466
Indicators of Compromise
- Repeated MP4Box process crashes or segmentation faults when handling specific media files
- Core dumps with stack frames referencing gf_filter_pid_get_packet in filter_pid.c
- AddressSanitizer or Valgrind reports flagging use-after-free in GPAC filter core during file ingestion
- Suspicious media files delivered to automated transcoding queues followed by worker termination
Detection Strategies
- Inventory all hosts and containers running GPAC or MP4Box and verify the installed version against 26.02.0
- Run vulnerable builds against the published proof-of-concept sample in a sandbox to confirm exposure
- Monitor build pipelines and package managers for outdated GPAC dependencies bundled inside other media applications
- Enable crash reporting on media-processing workloads to capture stack traces that match the vulnerable function
Monitoring Recommendations
- Alert on abnormal exit codes or signal terminations from MP4Box worker processes
- Log file hashes for media inputs entering processing pipelines to support post-incident triage
- Track CPU and memory anomalies in containers running GPAC-based services
- Forward process crash telemetry to a central data lake for correlation with file upload events
How to Mitigate CVE-2025-60466
Immediate Actions Required
- Upgrade GPAC and MP4Box to version 26.02.0 or later on all affected systems
- Rebuild any internal applications that statically link or vendor the GPAC library against the patched release
- Restrict MP4Box processing of untrusted media files to isolated sandboxes with resource limits
- Validate the patch by reviewing GPAC issue #3284 and the corresponding commit
Patch Information
The fix is implemented in upstream commit 4a7ea06dd1b2cc65fe0dabc60189eb6bc814f7bb, which resolves GitHub issue #3284. The patch adds lifecycle checks on task->pid->pid->removed, task->filter->finalized, and task->filter->removed, then cleans up detached PID instances before returning. Upgrade to GPAC 26.02.0 or later. Proof-of-concept material is published at sigdevel/pocs and discussed on InfoSec Exchange.
Workarounds
- Block ingestion of media files from untrusted sources until the patched version is deployed
- Run MP4Box under a restricted user account with seccomp or AppArmor profiles to limit crash impact
- Implement file-type and size validation before invoking GPAC-based processing tools
- Use process supervisors that automatically restart crashed workers while alerting on repeated failures
# Verify installed MP4Box version and upgrade from source
MP4Box -version
git clone https://github.com/gpac/gpac.git
cd gpac
git checkout v2.6.0 # or any tag >= 26.02.0
./configure
make -j$(nproc)
sudo make install
# Re-verify after upgrade
MP4Box -version
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

