# CVE-2026-125250: FFmpeg through 9.0.2 GIF Encoder Heap Buffer Overflow via shrunk_buf Remap

- Severity: High 8.5 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-11-09T19:11:56.203Z
- Modified: 2026-11-30T16:22:13.463Z
- Weaknesses: CWE-122
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: VulnCheck

## 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.

(As written by CVE List.)

## Affected

- FFmpeg FFmpeg: up to 9.0.2

## Every score

- VulnCheck: CVSS:4.0 8.5 High `CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25690> (issue-tracking, patch)
- <https://github.com/FFmpeg/FFmpeg/commit/26c2980980295e5516f308c5a2792d2a72e43eae> (patch)
- <https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/gif.c#L405> (patch, technical-description)
- <https://github.com/FFmpeg/FFmpeg> (product)
- <https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-gif-encoder-heap-buffer-overflow-via-shrunk-buf-remap> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-125250](https://www.cve.org/CVERecord?id=CVE-2026-125250), CVE Terms of Use, modified 2026-11-13
- NVD: [CVE-2026-125250](https://nvd.nist.gov/vuln/detail/CVE-2026-125250), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-125250 · Whole record: https://cve.day/CVE-2026-125250.json · Rebuilt by cve.day 2026-11-30T16:32:18.829Z
