FFmpeg 9.0.2 heap buffer overflow in GIF encoder (gif_image_write_image)
CVE-2026-125250 Published on November 9, 2026

FFmpeg through 9.0.2 GIF Encoder Heap Buffer Overflow via shrunk_buf Remap
FFmpeg through 9.0.2 contains a heap buffer overflow in the GIF encoder's gif_image_write_image() in libavcodec/gif.c because shrunk_buf is sized from the first frame's linesize. Attackers can supply PAL8 video whose frame linesize grows mid-stream, causing remap_frame_to_palette() to write past shrunk_buf and corrupt the heap during GIF transcoding.

NVD

Vulnerability Analysis

CVE-2026-125250 is exploitable with local system access. This vulnerability is considered to have a low attack complexity. The potential impact of an exploit of this vulnerability is considered to have no impact on confidentiality and integrity and availability.

Exploitation:
NONE
Automatable:
NO
Technical Impact:
TOTAL
Attack Vector:
LOCAL
Attack Complexity:
LOW
Privileges Required:
NONE
User Interaction:
PASSIVE

Weakness Type

Heap-based Buffer Overflow

A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().


Products Associated with CVE-2026-125250

Want to know whenever a new CVE is published for FFmpeg? stack.watch will email you.

Affected Versions

FFmpeg:

Exploit Probability

EPSS
0.14%
Percentile
3.78%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.