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

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

CVE-2025-60491 is a heap use-after-free vulnerability in GPAC MP4Box that enables attackers to trigger Denial of Service through crafted MP4 files. This article covers the technical details, affected versions, and mitigation strategies.

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-60491 Overview

CVE-2025-60491 is a heap use-after-free vulnerability in the dasher_flush_segment function located in /filters/dasher.c of the GPAC Project's MP4Box utility. Versions of GPAC prior to 2.5 are affected. An attacker can trigger the condition by supplying a crafted MP4 file to MP4Box, causing a Denial of Service (DoS) when the application dereferences a freed heap object during DASH segment flushing.

GPAC is a widely deployed multimedia framework used for packaging, streaming, and processing MPEG-4, 3GPP, and DASH content. The flaw affects any workflow that processes untrusted MP4 input through the dasher filter.

Critical Impact

Processing a malicious MP4 file through GPAC MP4Box triggers a heap use-after-free, crashing the process and interrupting media packaging pipelines.

Affected Products

  • GPAC Project MP4Box versions prior to 2.5
  • GPAC multimedia framework distributions bundling the dasher filter
  • Downstream tools and services that embed GPAC for DASH segmentation

Discovery Timeline

  • 2026-10-21 - CVE-2025-60491 published to the National Vulnerability Database (NVD)
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2025-60491

Vulnerability Analysis

The defect resides in dasher_flush_segment within src/filters/dasher.c. During segment flushing, the function iterates over dash streams and manipulates pointers tracked in the set->udta field and the muxed_base relationship between streams. When a base stream (ds) is released or re-linked, references held by sibling streams (ds2) continue to point at the freed object. A subsequent dereference of set->udta operates on memory that no longer belongs to a valid stream descriptor.

The condition is reachable through a crafted MP4 container that forces the dasher filter into the state where muxed base relationships and set user-data pointers become inconsistent. The result is a classified Use-After-Free [CWE-416] producing process termination.

Root Cause

The root cause is missing pointer fix-up logic when a muxed base stream is detached. The dasher cleared ds2->muxed_base but left ds2->set->udta pointing at the freed ds descriptor. Any later read of set->udta during segment flushing operates on dangling memory.

Attack Vector

Exploitation requires an attacker to deliver a malicious MP4 file to a victim running MP4Box or any application that invokes the GPAC dasher filter. Server-side transcoding pipelines, content ingestion services, and command-line users are all in scope. Successful triggering crashes the process, yielding a Denial of Service.

c
				if (ds && ds2 && ds2->muxed_base == ds) {
					ds2->muxed_base = NULL;
				}
+				//we also may need to swap the set ds
+				if (ds2->set->udta==ds)
+					ds2->set->udta = ds2;
			}

			if (ctx->next_period)

Source: GPAC commit f6128214. The patch adds the missing re-assignment of set->udta when the base descriptor is released, replacing the stale pointer with the sibling stream descriptor ds2.

Detection Methods for CVE-2025-60491

Indicators of Compromise

  • Unexpected crashes or SIGSEGV terminations of MP4Box or GPAC-based services when processing user-supplied MP4 files.
  • Core dumps whose stack frames reference dasher_flush_segment or /filters/dasher.c.
  • Input MP4 samples matching the proof-of-concept documented in the sigdevel GPAC PoC repository.

Detection Strategies

  • Enable AddressSanitizer (ASan) builds of GPAC in test environments to flag heap-use-after-free events in dasher_flush_segment.
  • Monitor media processing workers for abnormal exit codes and repeated restarts tied to specific uploaded files.
  • Hash and quarantine MP4 inputs that trigger the crash signature for offline analysis and sharing with incident response.

Monitoring Recommendations

  • Instrument transcoding and DASH packaging services to emit telemetry on process termination, exit signal, and input filename.
  • Centralize GPAC worker logs so repeated dasher failures correlate across hosts and tenants.
  • Alert on anomalous spikes in MP4 upload rejection or worker restart counts within media ingestion pipelines.

How to Mitigate CVE-2025-60491

Immediate Actions Required

  • Upgrade GPAC to version 2.5 or later, which contains the fix from commit f6128214.
  • Restrict MP4Box execution to trusted inputs until patched builds are deployed across all workers.
  • Isolate media processing services in sandboxed containers with strict resource limits to contain crashes.
  • Audit downstream applications and distributions that bundle GPAC to confirm they ship a patched version.

Patch Information

The upstream fix is committed in GPAC commit f6128214feb69cd689e4b9944a2621bc4ad8faf0, which resolves GPAC issue #3326. The patch adds the missing set->udta reassignment inside the muxed base cleanup loop in dasher_flush_segment. Deploy GPAC releases built from this commit or later (2.5+).

Workarounds

  • Disable the DASH packaging workflow or dasher filter for untrusted inputs until the patched version is installed.
  • Pre-validate incoming MP4 files with a hardened parser or format whitelist before passing them to MP4Box.
  • Run MP4Box under a non-privileged account with filesystem and network restrictions to limit DoS blast radius.
bash
# Build and install patched GPAC from source
git clone https://github.com/gpac/gpac.git
cd gpac
git checkout f6128214feb69cd689e4b9944a2621bc4ad8faf0
./configure && make -j$(nproc)
sudo make install
MP4Box -version

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.