CVE-2026-125229: FFmpeg through 9.0.2 Out-of-Bounds Memory Access in Huffyuv/FFVHUFF Median Predictor
FFmpeg through 9.0.2 contains an out-of-bounds memory access vulnerability in the encodeframe() function of libavcodec/huffyuvenc.c, because encodeinit() 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 submedianpred lengths and out-of-bounds reads and writes when transcoded to huffyuv or ffvhuff, crashing the encoder.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/ffmpegto a version that resolves this vulnerability.Fixed in 8.1.4-r0 - Upgrade
Upgrade
debian/ffmpegto a version that resolves this vulnerability.Fixed in 7:7.1.6-0+deb13u1Fixed in 7:9.1-3 - Upgrade
Upgrade
debian/ffmpegto a version that resolves this vulnerability.Fixed in 7:7.1.6-0+deb13u1
Event History
Frequently Asked Questions
Which workflows are exposed to this issue?
Workflows that transcode attacker-controlled or otherwise unusually small video frames to the huffyuv or ffvhuff encoder are exposed. The vulnerable path is in FFmpeg's encoder, not merely in decoding or playback.
What input is needed to trigger the vulnerability?
An attacker needs to cause transcoding of a tiny video frame using the median predictor, such as a frame that is 2 pixels wide or 1–2 pixels tall. User interaction is required according to the supplied vector.
What is the likely impact of successful exploitation?
The malformed dimensions cause negative sub_median_pred lengths and out-of-bounds reads and writes in encode_frame(). This can crash the encoder; the provided severity vector also rates confidentiality, integrity, and availability impacts as high.
What can be done while patching is unavailable?
Avoid transcoding untrusted tiny videos to huffyuv or ffvhuff, and reject or normalize frames that are 2 pixels wide or 1–2 pixels tall before they reach these encoders.