CVE-2025-55661
Executive Summary
CVE-2025-55661 is a heap buffer overflow vulnerability in the Opus audio stream parser component of GPAC MP4Box version 2.4. This flaw allows an attacker to cause a Denial of Service (DoS) by supplying a crafted MP4 file. The vulnerability resides in the way GPAC handles Opus audio streams within MP4 containers, leading to a heap-based buffer overflow when parsing malformed data. The CVSS score is 0.0 due to incomplete NVD data, but based on the description, the impact is limited to availability (DoS) with low attack complexity and no privileges required, though user interaction is needed to open the malicious file.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
GPAC is a widely used multimedia framework, and MP4Box is a command-line tool for MP4 file manipulation. This vulnerability affects users who process untrusted MP4 files with GPAC MP4Box. The risk is elevated in environments where automated media processing pipelines ingest files from external sources. No patch is currently available, and the vulnerability remains unpatched.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Local (L) – The attacker must provide a file to the victim.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – Victim must open the crafted file.
- Scope (S): Unchanged (U) – The vulnerable component is the only affected system.
- Confidentiality (C): None (N) – No data exposure.
- Integrity (I): None (N) – No data modification.
- Availability (A): High (H) – Service crash or resource exhaustion.
Threat Level: Medium (based on DoS impact and user interaction requirement).
Deep Dive & Mechanics
The vulnerability is a heap buffer overflow in the Opus audio stream parser within GPAC MP4Box. When processing an MP4 file containing an Opus audio track, the parser reads sample data into a heap-allocated buffer. A crafted MP4 file can specify a sample size that is larger than the allocated buffer, causing a write beyond the buffer boundaries. This overflow corrupts adjacent heap memory, leading to a crash (DoS). The root cause is insufficient validation of sample size parameters in the Opus parsing logic.
The vulnerable code path is triggered when MP4Box processes the stsz (sample size) box or similar atom that defines sample sizes. The parser fails to check if the declared sample size exceeds the allocated buffer capacity before copying data.
Vulnerable vs. Patched Code
Vulnerable Code (GPAC MP4Box v2.4):
// Simplified vulnerable snippet
unsigned char *buffer = gf_malloc(sample_size);
// No bounds check before reading sample data
gf_bs_read_data(bs, buffer, sample_size);
Patched Code (Hypothetical fix):
// Patched version with bounds check
unsigned int max_size = 1024 * 1024; // Example limit
if (sample_size > max_size) {
GF_LOG(GF_LOG_ERROR, ("Sample size too large\n"));
return -1;
}
unsigned char *buffer = gf_malloc(sample_size);
gf_bs_read_data(bs, buffer, sample_size);
The fix would involve validating the sample size against a reasonable maximum before allocation and reading.
Exploitation & Lab Setup
Red Team
Lab Setup:
- Install GPAC MP4Box v2.4 on a Linux VM.
- Create a crafted MP4 file with a malformed Opus sample size.
Exploit Steps:
- Use a hex editor to modify a valid MP4 file containing an Opus track.
- Locate the
stszbox and change a sample size value to a large number (e.g., 0xFFFFFFFF). - Run the crafted file through MP4Box:
MP4Box -info crafted.mp4 - Observe the crash due to heap buffer overflow.
Note: No public exploit code is available. The above is a conceptual approach.
Blue Team
Detection:
- Monitor for crashes of MP4Box processes.
- Use file integrity monitoring to detect crafted MP4 files.
- Implement sandboxing for media processing.
Hunting:
- Search for MP4 files with abnormally large sample sizes in
stszboxes. - Analyze logs for MP4Box crashes with heap corruption errors.
Indicators of Compromise (IOCs)
- File Hashes: (None available – crafted files vary)
- Process Anomalies: MP4Box process crash with heap corruption.
- Network: No network indicators (local file-based).
- Logs: Application crash logs with references to
gf_mallocorgf_bs_read_data.
Detection Engineering
YARA Rule
rule CVE_2025_55661_GPAC_Opus_Overflow {
meta:
description = "Detects crafted MP4 files exploiting CVE-2025-55661"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-55661"
strings:
$stsz = "stsz" ascii wide nocase
$opus = "Opus" ascii wide nocase
$large_size = { FF FF FF FF } // 4-byte large sample size
condition:
$stsz and $opus and $large_size
}
Sigma Rule
title: GPAC MP4Box Heap Buffer Overflow via Crafted MP4
id: 8a3b2c1d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects crashes of MP4Box due to heap buffer overflow in Opus parser
author: Valters IT
logsource:
category: application
product: gpac
service: mp4box
detection:
selection:
EventID: 1000 # Windows crash event
Image|endswith: '\MP4Box.exe'
ExceptionCode: 0xc0000005 # Access violation
condition: selection
falsepositives:
- Legitimate large files (rare)
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-55661 GPAC MP4Box Opus Overflow Attempt"; flow:to_server; file_data; content:"stsz"; content:"Opus"; content:"|FF FF FF FF|"; distance:0; within:4; classtype:attempted-dos; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Avoid processing untrusted MP4 files with GPAC MP4Box v2.4.
- Workaround: Use alternative media processing tools (e.g., FFmpeg) for Opus-containing MP4 files.
- Patch: Monitor GPAC repository for a security update. Apply when available.
- Long-term: Implement input validation and fuzzing in media parsing pipelines.
Valters IT
Securing Digital Frontiers