CVE-2025-60467 Overview
CVE-2025-60467 is a use-after-free vulnerability [CWE-416] in the gf_filter_pid_inst_swap_delete_task function located in src/filter_core/filter_pid.c of the GPAC multimedia framework. The flaw affects GPAC Project MP4Box versions before 26.02.0. An attacker can trigger the condition by supplying a crafted media file to MP4Box, leading to a denial-of-service condition in the parsing process. The vulnerability is reachable over the network attack surface when MP4Box processes untrusted media files received from external sources.
Critical Impact
Remote attackers can cause a denial of service by delivering a malformed media file that triggers use-after-free memory corruption during PID instance teardown.
Affected Products
- GPAC Project MP4Box versions before 26.02.0
- GPAC multimedia framework filter_core component
- Applications and pipelines that embed GPAC libraries for media processing
Discovery Timeline
- 2026-06-24 - CVE-2025-60467 published to NVD
- 2026-06-25 - Last updated in NVD database
Technical Details for CVE-2025-60467
Vulnerability Analysis
The vulnerability resides in the GPAC filter pipeline, specifically in gf_filter_pid_inst_swap_delete_task. This task handles teardown and reconfiguration of PID (packet identifier) instances when filter graph relinking is required. When reconfiguration fails, the code path attempts to relink the destination filter even when a detach operation is already pending. This results in operations on a freed pidinst structure, producing a use-after-free condition. Processing a crafted media file forces the filter graph into an error path that triggers this race between detach and relink, corrupting heap state and crashing the process.
Root Cause
The root cause is missing state validation before issuing gf_filter_relink_dst on a PID instance. The original code unconditionally relinked the destination filter on reconfiguration failure, ignoring the detach_pending flag on pidinst. When a detach is already scheduled, the underlying instance can be freed before relink completes, leaving a dangling reference.
Attack Vector
An attacker delivers a specifically crafted media file to a system running a vulnerable MP4Box build. Parsing the file forces a PID reconfiguration failure while a detach task is pending. No authentication or user interaction beyond opening the file is required. Successful exploitation crashes the MP4Box process and denies service to dependent media pipelines.
// Patched code from src/filter_core/filter_pid.c
// Source: https://github.com/gpac/gpac/commit/976dacf65cb6986a4e4f350fb8d3ed0a17dc3a77
GF_LOG(GF_LOG_ERROR, GF_LOG_FILTER, ("Failed to reconfigure PID %s:%s in filter %s: %s\n",
pid->filter->name, pid->name, filter->name, gf_error_to_string(e)));
filter->session->last_connect_error = e;
// do not relink dst if one relink already pending
else if (!pidinst->detach_pending) {
GF_LOG(GF_LOG_INFO, GF_LOG_FILTER, ("Failed to reconfigure PID %s:%s in filter %s: %s, reloading filter graph\n",
pid->filter->name, pid->name, filter->name, gf_error_to_string(e)));
gf_list_add(pid->filter->blacklisted, (void *) filter->freg);
gf_filter_relink_dst(pidinst, e);
} else {
e = GF_OK;
}
The patch introduces a check on pidinst->detach_pending and short-circuits the relink path when a detach is already in flight, preventing reuse of the freed instance.
Detection Methods for CVE-2025-60467
Indicators of Compromise
- Unexpected crashes or SIGSEGV terminations of MP4Box processes when handling user-supplied media files
- Core dumps with stack frames referencing gf_filter_pid_inst_swap_delete_task or gf_filter_relink_dst
- Repeated parsing failures correlated with delivery of unfamiliar .mp4, .mov, or other container files from untrusted sources
Detection Strategies
- Inventory all hosts and containers running GPAC or MP4Box and identify versions earlier than 26.02.0
- Monitor process exit codes and crash telemetry for media processing workers and batch transcoding jobs
- Inspect media ingestion pipelines for anomalous files that trigger repeated parser restarts
Monitoring Recommendations
- Forward MP4Box stderr logs and crash reports to a centralized logging platform for correlation
- Alert on abnormal restart rates of media processing services that embed GPAC libraries
- Track filesystem and network sources delivering media files to GPAC-based workloads for unusual upload patterns
How to Mitigate CVE-2025-60467
Immediate Actions Required
- Upgrade GPAC and MP4Box to version 26.02.0 or later across all systems
- Restrict MP4Box invocation to trusted input sources until patching is complete
- Sandbox media processing services using container isolation, seccomp, or dedicated low-privilege accounts
Patch Information
The upstream fix is committed as 976dacf65cb6986a4e4f350fb8d3ed0a17dc3a77 in the GPAC repository. The patch adds a detach_pending guard in gf_filter_pid_inst_swap_delete_task to prevent relink operations on freed PID instances. Refer to the GPAC Commit 976dacf and GitHub Issue #3286 for technical details. A public proof of concept is documented in the sigdevel PoC Repository.
Workarounds
- Disable automated MP4Box processing of files received from untrusted or external sources
- Run MP4Box inside a resource-limited sandbox with automatic restart policies to contain crash impact
- Apply file-type and size validation at the ingestion layer before passing media to GPAC components
# Verify installed GPAC/MP4Box version and upgrade
MP4Box -version 2>&1 | head -n 1
# Build patched GPAC from source
git clone https://github.com/gpac/gpac.git
cd gpac
git checkout v2.6.0 # or any tag >= 26.02.0
./configure --static-mp4box
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.

