
21 Zero-Days in FFmpeg | depthfirst
depthfirst reports 21 zero-day memory-safety bugs in FFmpeg found by its autonomous security agent for about $1k, nine with CVEs (CVE-2026-39210 to CVE-2026-39218). Bugs span the TS, DASH, AVI and CAF demuxers, RTP/RTSP depacketizers, swscale and the VP9 decoder, some latent since 2003. It details the AV1 RTP depacketizer heap overflow, which overwrites AVBuffer.free to reach PC control from one 183-byte packet.
What it is
depthfirst reports 21 fixed memory-safety bugs in FFmpeg, found by its autonomous security agent at a stated cost of about $1k. The post says that is 10% of what Anthropic spent scanning FFmpeg with Mythos. Nine bugs have CVE-2026-39210 through CVE-2026-39218. The other twelve are listed under depthfirst's internal IDs, DFVULN-116 to DFVULN-127. The post says these are fixed but gives no fixed versions or commit links.
The nine CVEs
| CVE | Class | Component | Introduced |
|---|---|---|---|
| CVE-2026-39210 | Heap overflow | TS demuxer, missing length check before a 2-byte read | 2010 |
| CVE-2026-39211 | Integer overflow | swscale, unbounded size factor | 2010 |
| CVE-2026-39212 | Stack overflow | ffmpeg_opt.c, recursive preset parsing with no depth limit | July 2025 |
| CVE-2026-39213 | Heap overflow | yuv4mpegenc rawvideo path, dimensions not checked against packet size | 2023 |
| CVE-2026-39214 | Stack overflow | SDT service entries written without tracking remaining space | 2003 |
| CVE-2026-39215 | Heap overflow | update_mb_info(), writes 12 bytes past the buffer | 2012 |
| CVE-2026-39216 | Heap overflow | img2enc.c, safe chroma size replaced by an unbounded one | 2012 |
| CVE-2026-39217 | Heap overflow | VP9 decoder, tile thread buffers not reallocated after a refactor | March 2025 |
| CVE-2026-39218 | Heap overflow | DASH demuxer, negative duration makes fragment indices negative | 2017 |
Network-reachable bugs without a CVE
Several DFVULN items sit in network protocol code, so they matter most for services that open untrusted URLs.
- DFVULN-127: RTP AV1 depacketizer, heap overflow (details below).
- DFVULN-125: RTP JPEG depacketizer. A crafted packet with qtable_len >= 1024 overflows a 1024-byte stack buffer by two bytes.
- DFVULN-123: RTP LATM depacketizer. A signed 32-bit addition overflows and bypasses a bounds check, so memcpy reads about 1 GB past a heap buffer.
- DFVULN-122: RTP MPEG-4 depacketizer. An AU-headers-length of 0 leads to a one-byte allocation read as a four-byte field. It dates from 2005.
- DFVULN-118: RTSP server path. An ANNOUNCE with
Content-Length: -1writes to sdp[-1]. It is a 2021 regression. - DFVULN-117: RTMP client. A check of
in_size < 3should bein_size < 8, so memcpy reads eight bytes from a buffer as small as three. - DFVULN-116: RTSP SDP parsing. strlen(control_url) - 1 on an empty string wraps to SIZE_MAX.
File-based items: DFVULN-126 (swscale interlaced YUV420P to NV12, 576-byte Y-plane overflow), DFVULN-124 (AVIF tile grid with zero entries), DFVULN-121 (CAF seek indexes index_entries[-1]), DFVULN-120 (AVI LIST chunk of size 0 underflows to about 4 GB and triggers a roughly 2 GB allocation, DoS), and DFVULN-119 (opt_map() stores stream index -1).
How the AV1 RTP exploit works
The bug is in av1_handle_packet() in libavformat/rtpdec_av1.c. When it skips a Temporal Delimiter OBU, it advances the output cursor pktpos by the attacker-declared obu_size. It allocates nothing for that advance, and it does not move the input pointer buf_ptr.
Because buf_ptr stays put, the next loop pass re-parses the delimiter's own bytes as a new OBU, so the attacker also controls the written data. In the example, obu_size is 148 and a fabricated 17-byte OBU makes av_grow_packet allocate 81 bytes (17 plus 64 padding). Writes begin at offset 148, which is 67 bytes past the end.
FFmpeg's av_buffer_alloc puts the data buffer, then an AVBuffer struct, in adjacent heap chunks. The 81-byte buffer occupies a 128-byte chunk, so AVBuffer.free sits at offset 152. The write starting at 148 leaves refcount (offsets 144 to 147) at 1 and overwrites free.
A third fabricated OBU triggers one more av_grow_packet. The buffer is not flagged reallocatable, so buffer_replace drops the refcount to 0 and calls b->free. The result is RIP = 0xdeadbeef from a single 183-byte packet on a release build. The post links a PoC.
Preconditions / Affected
For the AV1 bug, a victim runs ffmpeg -i rtsp://attacker/stream with no special flags. It triggers during the normal RTSP PLAY phase, with no authentication or further user interaction. The post names three exposed deployments: ingest pipelines fetching user-supplied stream URLs, RTSP surveillance clients, and transcoders handling remote AV1-over-RTP.
Exploitability is demonstrated only for DFVULN-127. The others are described as bugs, and the post makes no exploitation claims for them.
What to do
The post states no patch versions, so check your FFmpeg build against upstream fixes for the CVE and DFVULN items above. Services that open attacker-influenced RTSP, RTMP or other network URLs, or untrusted TS, DASH, AVI, CAF and AVIF files, are the ones exposed.
Caveats
This is a vendor post comparing its own cost and coverage to Google Big Sleep and Anthropic Mythos, without detailing their methods. Three flaws predate 2010: SDT (2003) and the MPEG-4 and LATM RTP depacketizers (2005 and 2010).
Organisations named here
- depthfirst
- DFVULN-116
- DFVULN-117
- DFVULN-118
- DFVULN-119
- DFVULN-120
- DFVULN-121
- DFVULN-122
- DFVULN-123
- DFVULN-124
- DFVULN-125
- DFVULN-126
- DFVULN-127
CVEs named here
- CVE-2026-39210
- CVE-2026-39211
- CVE-2026-39212
- CVE-2026-39213
- CVE-2026-39214
- CVE-2026-39215
- CVE-2026-39216
- CVE-2026-39217
- CVE-2026-39218
Technologies named here
- FFmpeg
- Big Sleep
- Mythos
- C
- Anthropic
- av_grow_packet / av_buffer_alloc / posix_memalign
- Deployments exposed to attacker-influenced RTSP URLs: media ingest pipelines, surveillance and CCTV systems, transcoding services
- depthfirst security agent
- FFmpeg AVI demuxer, avidec.c (DFVULN-120, integer underflow, introduced 2011)
- FFmpeg AVIF overlay path, ffmpeg_demux.c (DFVULN-124, introduced 2025)
- FFmpeg CAF demuxer, cafdec.c (DFVULN-121, heap buffer underflow, since 2009)
- FFmpeg DASH demuxer (CVE-2026-39218, introduced 2017)
- FFmpeg ffmpeg_opt.c (CVE-2026-39212, stack overflow via recursive preset parsing, regression from July 2025; DFVULN-119 opt_map(), 2025 regression)
- FFmpeg img2enc.c (CVE-2026-39216, introduced 2012)
- FFmpeg RTMP client, rtmpproto.c (DFVULN-117, since 2012)
- FFmpeg RTP AV1 depacketizer, rtpdec_av1.c (DFVULN-127, heap buffer overflow, since 2024)
- FFmpeg RTP JPEG depacketizer, rtpdec_jpeg.c (DFVULN-125, stack buffer overflow, 2012 regression)
- FFmpeg RTP LATM depacketizer, rtpdec_latm.c (DFVULN-123, integer overflow, since 2010)
- FFmpeg RTP MPEG-4 depacketizer, rtpdec_mpeg4.c (DFVULN-122, since 2005)
- FFmpeg RTSP SDP parsing, rtsp.c (DFVULN-116, since 2010)
- FFmpeg RTSP server path, rtspdec.c (DFVULN-118, 2021 regression)
- FFmpeg SDT implementation (CVE-2026-39214, stack buffer overflow, introduced 2003)
- FFmpeg swscale (CVE-2026-39211, integer overflow, introduced 2010; DFVULN-126, graph.c run_legacy_unscaled(), introduced 2024)
- FFmpeg TS demuxer (CVE-2026-39210, heap buffer overflow, introduced 2010)
- FFmpeg update_mb_info() (CVE-2026-39215, introduced 2012)
- FFmpeg VP9 decoder (CVE-2026-39217, regression from March 2025)
- FFmpeg yuv4mpegenc rawvideo input path (CVE-2026-39213, introduced 2023)
- PoC code
- RTP AV1 payload format
Techniques named here
- Integer Overflow
- Crafted RTSP/RTP packet delivery
- Function pointer overwrite
- Heap buffer overflow
- Heap layout manipulation
- Integer overflow and underflow exploitation
- Threat modeling and data flow analysis
Related in AppSec
Flowise MCP Security Bypass Enables RCE
Inside an Oracle Database SQL Injection Attack | Huntress
OASIS
