CVE-2026-125250: FFmpeg heap buffer overflow in GIF encoder

CVE-2026-125250 · Severity: high · CVSS 7.8 · Published 2026-11-09

FFmpeg is a multimedia framework used to encode and transcode audio and video. A heap buffer overflow in FFmpeg's GIF encoder can be triggered when transcoding video files with certain frame properties, potentially allowing an attacker to corrupt memory and execute arbitrary code on systems that process untrusted video input.

Technologies: Ffmpeg. Vendors: Ffmpeg.

Quick answers

Is CVE-2026-125250 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-125250 being exploited in the wild.
How severe is CVE-2026-125250?
High severity, with a CVSS score of 7.8, published 9 November 2026.
Which products and versions are affected?
Ffmpeg through 9.0.2.
Is there a fix for CVE-2026-125250?
Yes: fixed in FFmpeg 9.1. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-125250 attacked?
It is attacked over the network or with local access, in a software library.
Am I affected by CVE-2026-125250?
Check whether you run Ffmpeg at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: FFmpeg 9.1

Technical details

The vulnerability exists in the gif_image_write_image() function in libavcodec/gif.c, where the shrunk_buf buffer is sized based on the first frame's linesize but does not account for linesize growth across subsequent frames. When processing PAL8 video, an attacker can craft input where frame linesize increases mid-stream, causing remap_frame_to_palette() to write past the buffer bounds. The attack requires only network access and the ability to provide malicious video input to an FFmpeg-based transcoding service.

Affected products

  • FFmpeg FFmpeg through 9.0.2

Timeline

  • 2026-11-09: disclosed
  • 2026-11-03: patched: Fix merged in PR #25690

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.