---
id: "CVE-2026-125229"
page: "https://infrastack.ai/live/CVE-2026-125229"
kind: "vulnerability"
aliases: ["CVE-2026-125229"]
title: "FFmpeg: tiny video frames crash the huffyuv encoder via out-of-bounds memory access"
severity: "high"
cvss: 8.5
epss: null
exploited: false
status: "open"
category: "runtime"
products: [{"name": "ffmpeg", "fixed": [], "affected": "<= 9.0.2", "ecosystem": "vendor"}]
ecosystems: []
tags: ["ffmpeg", "huffyuv", "media-processing", "runtime", "video-transcoding"]
not_affected_if: ["codec-not-used", "non-huffyuv-encoder", "trusted-input-only"]
published_at: "2026-11-09T19:17:00+00:00"
first_seen_at: "2026-11-09T19:28:20+00:00"
updated_at: "2026-11-09T19:32:40+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125229", "first_seen_at": "2026-11-09T19:28:20+00:00"}, {"source": "analyst", "url": null, "first_seen_at": "2026-11-09T19:32:40+00:00"}]
exploit_sources: []
---

# FFmpeg: tiny video frames crash the huffyuv encoder via out-of-bounds memory access

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

FFmpeg's huffyuv and ffvhuff encoders do not check minimum frame dimensions when using the median predictor. A tiny input video, such as a 2-pixel-wide frame, causes out-of-bounds reads and writes that crash the encoder.

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

## Affected

- vendor:ffmpeg affected <= 9.0.2 fixed no fixed version listed

## How to check

Run 'ffmpeg -version'. If it is 9.0.2 or older and has no backport of commit 45f98d08, and you transcode untrusted video with -c:v huffyuv or -c:v ffvhuff (median predictor, the default), you are exposed. Also grep your pipeline configs for huffyuv/ffvhuff. Patched builds refuse tiny frames with 'Frame too small for the median predictor'.

## Fix

Fixed in FFmpeg git commit 45f98d0819efe2b7ce93e9034b7e6a4ed6700621 (avcodec/huffyuvenc: reject frames too small for the median predictor). No release version stated; affected is 'through 9.0.2'. Update to a build that includes this commit, or check the FFmpeg release notes for the first release after 9.0.2.

## Timeline

- 2026-11-09T19:28:20+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125229
- 2026-11-09T19:32:40+00:00 analyst — Read FFmpeg commit 45f98d08 (via WebFetch; web-cli out of Exa credits) and VulnCheck advisory. Fix is a source commit adding a size check in encode_init; no release containing it is named on either page, so fixed version unknown. Nothing marked verified.

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-out-of-bounds-memory-access-in-huffyuv-ffvhuff-median-predictor
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/45f98d0819efe2b7ce93e9034b7e6a4ed6700621

## From the sources

FFmpeg through 9.0.2 contains an out-of-bounds memory access vulnerability in the encode_frame() function of libavcodec/huffyuvenc.c, because encode_init() never validates minimum frame dimensions for the median predictor. Attackers can supply a tiny video, such as a 2-pixel-wide or 1-2-pixel-tall frame, that causes negative sub_median_pred lengths and out-of-bounds reads and writes when transcoded to huffyuv or ffvhuff, crashing the encoder.

---

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