CVE-2026-8124
Heap Overflow in GPAC
Publication date: 2026-05-08
Last updated on: 2026-05-08
Assigner: VulDB
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| gpac | gpac | to 26.02.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-400 | The product does not properly control the allocation and maintenance of a limited resource. |
| CWE-770 | The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. |
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.
Can you explain this vulnerability to me?
This vulnerability exists in the GPAC media framework, specifically in the function sidx_box_read within the file src/isomedia/box_code_base.c. The issue arises because the function reads a 16-bit field called nb_refs from a media file and allocates memory based on this value without properly verifying if the data is valid or sufficient.
An attacker can craft a malicious media file with an abnormally large nb_refs value (up to 65,535) but without providing the corresponding reference data. This causes the function to allocate a large amount of memory (approximately 1.5 MB) unnecessarily before detecting the error.
The vulnerability leads to excessive memory allocation and potential memory corruption or exhaustion because the validation of nb_refs happens only after memory allocation, which is too late to prevent the issue.
The attack must be carried out locally and can cause denial-of-service conditions by exhausting system memory temporarily.
How can this vulnerability impact me? :
This vulnerability can impact you by causing your system or application using GPAC to allocate excessive amounts of memory when processing specially crafted media files.
The excessive memory allocation can lead to transient memory exhaustion, which may cause denial-of-service (DoS) conditions, especially in resource-constrained environments such as embedded or IoT devices, or in high-concurrency scenarios like media transcoding pipelines.
Although the memory is freed correctly after the error is detected, the temporary spike in memory usage can disrupt normal operations, degrade performance, or cause crashes.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by analyzing the behavior of the GPAC media framework when processing MP4 files, specifically looking for unusually large memory allocations triggered by crafted sidx boxes.
A proof-of-concept file can be used to test the vulnerability by feeding a minimal MP4 file with a malicious sidx box to GPAC's MP4Box tool and monitoring memory usage.
Commands to detect the vulnerability could include running GPAC's MP4Box on suspicious or untrusted MP4 files while monitoring memory allocation with tools like Valgrind heap profiling or system monitoring commands.
- Use Valgrind to profile heap allocations: valgrind --tool=massif MP4Box suspicious_file.mp4
- Monitor memory usage during file processing: top or htop while running MP4Box
- Check for unusually large allocations or crashes when processing MP4 files with sidx boxes.
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to install the patch identified by commit 442e2299530138d8f874fd885c565ba98a6318ba in the GPAC repository.
This patch adds validation to the sidx_box_read function to prevent unsafe memory allocations by checking the number of references before allocating memory.
Until the patch is applied, avoid processing untrusted or malformed MP4 files that could exploit this vulnerability.
- Update GPAC to a version including the patch 442e2299530138d8f874fd885c565ba98a6318ba or later.
- Restrict local access to systems running vulnerable GPAC versions to trusted users only, as the attack requires local execution.
- Monitor and audit usage of GPAC tools to detect abnormal memory usage or crashes.