---
id: "CVE-2026-125203"
page: "https://infrastack.ai/live/CVE-2026-125203"
kind: "vulnerability"
aliases: ["CVE-2026-125203"]
title: "FFmpeg: crafted RealMedia Cook file overflows heap during decoding"
severity: "high"
cvss: 8.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ffmpeg", "libavcodec", "media-processing", "package"]
not_affected_if: ["fixed-version", "no-realmedia-decoding"]
published_at: "2026-11-09T19:16:56+00:00"
first_seen_at: "2026-11-09T19:28:18+00:00"
updated_at: "2026-11-09T19:29:34+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125203", "first_seen_at": "2026-11-09T19:28:18+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted RealMedia Cook file overflows heap during decoding

Link for people: https://infrastack.ai/live/CVE-2026-125203 (this .md is for agents)

FFmpeg's Cook multichannel decoder does not check that subpacket channel masks are disjoint, so a crafted RealMedia Cook stream makes it write decoded samples past allocated buffers. An attacker who gets a victim to decode such a file can corrupt memory, which may lead to code execution in the application doing the decoding.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed FFmpeg version with `ffmpeg -version`; affected builds are before `8.1.3` on the 8.x line and before `9.0.2` on the 9.x line.
- Find applications that link libavcodec or shell out to ffmpeg to decode media, especially ones that accept user-uploaded RealMedia files.

## Fix

- FFmpeg `8.1.3` for the 8.x line
- FFmpeg `9.0.2` for the 9.x line

## Timeline

- 2026-11-09T19:28:18+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125203

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-before-8.1.3-and-9-x-before-9.0.2-heap-buffer-overflow-in-cook-multichannel-decoder
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/3e09f5e24eb277a6d011745ff03e602f61c5c171

## From the sources

FFmpeg before 8.1.3 and 9.x before 9.0.2 contains a heap buffer overflow vulnerability in the Cook multichannel decoder in libavcodec/cook.c that fails to verify subpacket channel masks are disjoint. Attackers can supply a crafted RealMedia Cook stream with overlapping subpacket masks, causing cook_decode_frame() to write decoded samples beyond allocated output planes in any application decoding the file.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
