CVE Catalog

CVE-2026-125250

HighCVSS 7.8
Published: Translated: NVD NIST

Summary

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.

Risk Assessment

Transcoding a malicious video to GIF can corrupt heap memory, leading to application crash or potential code execution.

Recommendation

Update FFmpeg to a version later than 9.0.2 and avoid transcoding untrusted PAL8 files to GIF until the fix is applied.

Other vulnerabilities in FFmpeg

See all
Original NVD description (English source)

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.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS