CVE-2026-134695 in MP4Box
Summary
by MITRE • 11/22/2026
GPAC MP4Box through 26.07.0 contains an out-of-bounds read vulnerability in avi_parse_input_file() in src/media_tools/avilib.c that increments track counters before checking AVI_MAX_TRACKS. Attackers can supply a crafted AVI file declaring a ninth audio stream, causing AVI_audio_format and AVI_close() to access track[8] and crash the process.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/22/2026
The vulnerability identified in GPAC MP4Box versions up to 26.07.0 represents a critical memory safety flaw within the library's handling of Audio Video Interleave files. Specifically, the defect resides in the avi_parse_input_file function located in the source file avilib.c. This component is responsible for parsing and interpreting AVI container structures during media processing operations. The core technical issue stems from an incorrect order of validation checks when initializing track data structures. When a user supplies a crafted AVI file that declares multiple audio streams, the parser increments internal track counters before verifying whether the number of tracks exceeds the predefined maximum limit defined by AVI_MAX_TRACKS. This logical error allows the application to proceed with accessing array indices that have not been properly allocated or validated against boundary constraints.
From a technical perspective, this flaw constitutes an out-of-bounds read vulnerability as classified under Common Weakness Enumeration CWE-125. The specific mechanism involves incrementing track counters prematurely, which leads to subsequent functions such as AVI_audio_format and AVI_close attempting to access memory at index eight of the track array. Since standard implementations typically allocate space for fewer than nine tracks or rely on strict bounds checking prior to indexing, accessing track[8] results in reading from invalid memory locations outside the allocated buffer boundaries. This behavior violates fundamental principles of safe memory management where input validation must precede any data structure manipulation that relies on those inputs.
The operational impact of this vulnerability is primarily a denial of service condition for applications utilizing GPAC MP4Box to process AVI files. An attacker can exploit this flaw by constructing a malicious AVI file containing exactly nine audio streams or more, triggering the out-of-bounds read during parsing. Upon execution, the application attempts to dereference memory at an invalid address, leading to immediate program termination via segmentation fault or similar crash mechanism. While the primary impact is stability disruption, depending on the specific compiler optimizations and runtime environment, such out-of-bounds reads can potentially leak sensitive information from adjacent memory regions if not properly mitigated by operating system protections like Address Space Layout Randomization. However, in most typical scenarios involving media processing tools, the immediate consequence remains process crash rather than arbitrary code execution or data exfiltration.
This vulnerability aligns with ATT&CK technique T1496, which covers Resource Hijacking through denial of service attacks using malformed inputs to disrupt availability. The lack of proper bounds checking before array access is a classic example of insufficient validation leading to resource exhaustion via application crash. To mitigate this risk, developers must ensure that all input parameters are validated against maximum limits before any state changes or memory accesses occur based on those values. In the context of GPAC MP4Box, updating to version 26.07.1 or later resolves this issue by correcting the validation logic within avi_parse_input_file. For organizations unable to update immediately, implementing input sanitization at the ingestion layer can prevent malformed AVI files from reaching the vulnerable parser component. Additionally enabling runtime memory protection mechanisms such as stack canaries and non-executable stacks provides an additional layer of defense against potential exploitation attempts derived from this flaw.