Critical FFmpeg Vulnerabilities Enable Remote Code Execution
Key Takeaways Twenty-one zero-day vulnerabilities, including a critical remote code execution (RCE) flaw, have been discovered in FFmpeg, a widely used media processing library. The most severe...
Key Takeaways
- Twenty-one zero-day vulnerabilities, including a critical remote code execution (RCE) flaw, have been discovered in FFmpeg, a widely used media processing library.
- The most severe vulnerability (DFVULN-127) is a heap buffer overflow in the AV1 RTP depacketizer, exploitable via a single 183-byte network packet without authentication or user interaction.
- FFmpeg’s pervasive use in browsers, streaming platforms, surveillance systems, and cloud infrastructure means a wide range of systems are at risk.
- Eight CVEs have been assigned, and patches are available, urging immediate application for network-facing deployments.
A specialized autonomous security agent has uncovered twenty-one previously unknown zero-day vulnerabilities within FFmpeg, the foundational open-source library that underpins media processing across countless digital platforms. Among these critical flaws is a heap buffer overflow that enables remote code execution (RCE) and can be triggered by a single, specially crafted 183-byte network packet.
Table Of Content
FFmpeg’s ubiquity in media processing for web browsers, streaming services, surveillance infrastructure, and cloud computing renders it a pivotal component in the global digital ecosystem. Its extensive codebase, comprising approximately 1.5 million lines of highly optimized C code, is responsible for parsing hundreds of complex media formats and has historically undergone decades of rigorous fuzzing and manual security audits.
This latest discovery follows prior security research efforts, including thirteen vulnerabilities identified by Google’s Big Sleep team and additional issues pinpointed by Anthropic’s Mythos AI model. Building on these advancements, security firm Depthfirst deployed its proprietary autonomous agent to scan FFmpeg, leading to the identification of these 21 zero-days. Notably, Depthfirst achieved this at an approximate cost of $1,000, representing about 10% of the expenditure incurred by Anthropic’s Mythos.
21 Zero-Day Vulnerabilities in FFmpeg
Unlike general-purpose coding agents, Depthfirst’s security agent employs sophisticated threat modeling techniques across large codebases. It meticulously maps attacker-controlled input entry points, traces data flow through critical components, and validates the reachability of vulnerable paths.
The agent’s methodology includes generating reproducible Proof-of-Concept (PoC) inputs to confirm vulnerabilities and eliminate false positives. Zhenpeng (Leo) Lin of Depthfirst has published the PoC code on GitHub.
The identified vulnerabilities impact various FFmpeg components, including the TS demuxer, VP9 decoder, RTP depacketizers, RTSP server, and RTMP client. Eight of these flaws have been officially assigned CVE identifiers:
- CVE-2026-39210 – A heap buffer overflow in the TS demuxer, introduced in 2010.
- CVE-2026-39211 – An integer overflow affecting swscale, present since 2010.
- CVE-2026-39212 – A stack overflow in ffmpeg_opt.c, identified as a regression from July 2025.
- CVE-2026-39213 – A heap buffer overflow in yuv4mpegenc, introduced in 2023.
- CVE-2026-39214 – A stack buffer overflow within the SDT implementation, a flaw that has remained latent for 23 years since its introduction in 2003.
- CVE-2026-39215 – A heap buffer overflow in update_mb_info(), present since 2012.
- CVE-2026-39216 – A heap buffer overflow in img2enc.c, introduced in 2012.
- CVE-2026-39217 – A heap buffer overflow in the VP9 decoder, a regression from March 2025.
- CVE-2026-39218 – A heap buffer overflow in the DASH demuxer, introduced in 2017.
Additional unassigned findings include bugs in the RTP AV1 depacketizer (DFVULN-127), AVI demuxer, CAF demuxer, RTSP SDP parser, RTMP client, and AVIF overlay path, many of which have existed for over 15 years.
Critical Remote Code Execution Flaw (DFVULN-127)
The most severe discovery is a heap buffer overflow in FFmpeg’s AV1 RTP depacketizer (libavformat/rtpdec_av1.c), tracked as DFVULN-127. This vulnerability stems from the depacketizer’s incorrect handling of Temporal Delimiter (TD) OBUs, which are special markers used to separate video frames.
The flaw occurs when a TD is encountered: the code advances the write cursor (pktpos) based on an attacker-controlled obu_size without performing corresponding memory allocation or advancing the input pointer (buf_ptr). This leads to two critical issues: the write cursor becomes compromised, and the subsequent iteration re-parses the TD’s own bytes as a new OBU with attacker-controlled content.
The resulting memory corruption directly impacts an AVBuffer struct, which is allocated immediately after the data buffer by FFmpeg’s posix_memalign-based allocator. Specifically, at offset +24 within this struct lies a free function pointer, the precise target of the overflow. When the packet is subsequently reallocated, FFmpeg decrements the buffer’s reference count to zero, triggering the execution of the now-corrupted free pointer and granting an attacker full control over the instruction pointer.
A functional PoC demonstrates that a single 183-byte RTP packet delivered over RTSP is sufficient to redirect execution. This attack requires no authentication, no user interaction, and no unusual flags, making it highly potent. Any system running ffmpeg -i rtsp://attacker/stream is vulnerable, including media ingest pipelines, CCTV and surveillance systems, and cloud transcoding services that process untrusted AV1-over-RTP sources.
What You Should Do
- Apply Patches Immediately: Update all FFmpeg installations to the latest patched versions as soon as they are released.
- Audit Network-Facing Deployments: Thoroughly review any systems or pipelines that process untrusted RTSP or RTP streams using FFmpeg.
- Isolate Vulnerable Systems: For systems that cannot be patched immediately, implement network segmentation to isolate them from untrusted networks.
- Monitor for Exploitation: Implement robust logging and monitoring to detect unusual network traffic or process behavior that might indicate attempted exploitation.
Disclaimer: HackersRadar reports on cybersecurity threats and incidents for informational and awareness purposes only. We do not engage in hacking activities, data exfiltration, or the hosting or distribution of stolen or leaked information. All content is based on publicly available sources.



No Comment! Be the first one.