FFmpeg through 9.0.2 GIF Encoder Heap Buffer Overflow via shrunk_buf Remap
- State
- Published
- Severity
- 8.5 High
- Published
- Nov 9, 2026
- Updated
- Nov 13, 2026
- Reserved
- Nov 9, 2026
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.
| Product | Versions |
|---|---|
| FFmpeg FFmpeg | 9.0.2 and earlier Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 4.0 | 8.5 High | VulnCheck | |
| 3.1 | 7.8 High | VulnCheck |
Weaknesses
- CWE-122 Heap-based Buffer Overflow
References
- https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25690Issue Tracker
- Patch CommitPatch
- https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/gif.c#L405Technical Details
- https://github.com/FFmpeg/FFmpegProduct Page
- VulnCheck Advisory: FFmpeg through 9.0.2 GIF Encoder Heap Buffer Overflow via shrunk_buf RemapThird-Party Advisory
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.