All reports
High

ffmpeg: heap buffer overflow via GIF encoder

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-125250

Probability of exploitation in the next 30 days: 0.14%

FIRST EPSS · 2026-11-20

Description

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.

A flaw was found in FFmpeg. A heap buffer overflow can occur in the GIF encoder when transcoding a specially crafted PAL8 video file due to a failure to resize the output buffer when the frame linesize grows mid-stream. This vulnerability can lead to memory corruption, potentially resulting in an application crash or arbitrary code execution.