CVE-2026-137907 in FFmpeg
Summary
by MITRE • 11/27/2026
FFmpeg 3.0 before 8.1.3 contains a heap buffer overflow vulnerability in libavfilter/vf_boxblur.c because query_formats() accepts pixel formats deeper than 16 bits while the blur temporary buffers hold only 2 bytes per pixel. Attackers can supply crafted 32-bit float media, such as PFM or OpenEXR images, that when processed by the boxblur filter overflow the temporary buffers, crashing applications or possibly executing code.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/27/2026
The vulnerability identified in FFmpeg versions prior to 8.1.3 represents a critical heap-based buffer overflow located within the libavfilter component, specifically affecting the vf_boxblur.c module which implements the box blur video filter. This flaw stems from an insufficient validation of pixel format properties during the initialization phase of the filtering process. The function query_formats() is responsible for negotiating and accepting various pixel formats supported by the filter pipeline. However, in vulnerable versions, this function erroneously accepts pixel formats with a bit depth greater than sixteen bits without adequately adjusting the allocation size for temporary processing buffers. Consequently, when the blur operation proceeds, it attempts to write data into memory regions that are significantly smaller than required for the specified input format, leading directly to out-of-bounds writes on the heap.
From a technical perspective, the core issue is a mismatch between the declared pixel depth and the allocated buffer size. The temporary buffers used by the box blur algorithm are hardcoded or calculated to hold only two bytes per pixel, which corresponds to standard 16-bit integer formats such as RGB565 or YUV420P with specific constraints. When an attacker supplies media files containing thirty-two-bit floating-point data, commonly found in high-dynamic-range imaging formats like PFM (Portable Float Map) or OpenEXR images, the filter processes these pixels using logic that assumes a larger memory footprint than actually allocated. This discrepancy causes subsequent write operations to overwrite adjacent heap metadata and application data structures. Such corruption can lead to immediate application crashes due to segmentation faults or more severe consequences if an attacker carefully crafts the overflow payload to manipulate control flow pointers stored in nearby memory regions.
The operational impact of this vulnerability is substantial, particularly for services that process user-uploaded video or image content using FFmpeg as a backend engine. Attackers can exploit this flaw by uploading specially crafted media files designed to trigger the heap buffer overflow during transcoding or filtering operations. Successful exploitation allows for arbitrary code execution with the privileges of the running application, potentially leading full system compromise if the service runs with elevated permissions. Additionally, even without successful code execution, the vulnerability enables denial-of-service attacks through repeated crashes of video processing services, disrupting availability and causing resource exhaustion as processes restart repeatedly. This is especially relevant in cloud-based media conversion platforms, streaming services, or automated content moderation systems that rely on FFmpeg for real-time analysis and transformation of visual data.
This vulnerability aligns with CWE-122, which describes a heap buffer overflow where memory allocated from the heap is written beyond its boundaries, often leading to unpredictable behavior and security breaches. In terms of offensive cyber operations frameworks, this flaw facilitates techniques associated with ATT&CK T1059, specifically command execution via exploitation of application vulnerabilities. The attack vector typically involves remote input through file upload interfaces or network streams where untrusted media is ingested by the vulnerable FFmpeg instance. To mitigate this risk, organizations must immediately upgrade to FFmpeg version 8.1.3 or later, which includes patches that properly validate pixel format depths and allocate sufficient buffer space for higher-bit-depth formats like thirty-two-bit floats. Furthermore, implementing strict input validation at the application layer before passing data to FFmpeg can provide an additional defense-in-depth measure. Security teams should also consider deploying web application firewalls with media inspection capabilities or sandboxing video processing tasks in isolated environments to limit the blast radius of any potential exploitation attempts until all systems are fully patched.