{"id":"CVE-2026-125250","summary":"FFmpeg through 9.0.2 GIF Encoder Heap Buffer Overflow via shrunk_buf Remap","details":"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.","modified":"2026-11-15T07:04:17.746601090Z","published":"2026-11-09T19:11:56.203Z","database_specific":{"cwe_ids":["CWE-122"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125250.json","cna_assigner":"VulnCheck"},"references":[{"type":"WEB","url":"https://code.ffmpeg.org/FFmpeg/FFmpeg"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125250.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125250"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-gif-encoder-heap-buffer-overflow-via-shrunk-buf-remap"},{"type":"REPORT","url":"https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25690"},{"type":"FIX","url":"https://github.com/FFmpeg/FFmpeg/commit/26c2980980295e5516f308c5a2792d2a72e43eae"},{"type":"PACKAGE","url":"https://github.com/FFmpeg/FFmpeg"},{"type":"ARTICLE","url":"https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/gif.c#L405"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/ffmpeg/ffmpeg","events":[{"introduced":"0"},{"fixed":"26c2980980295e5516f308c5a2792d2a72e43eae"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"0"},{"last_affected":"9.0.2"}],"source":"AFFECTED_FIELD","strategy":"StandardRange"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"26c2980980295e5516f308c5a2792d2a72e43eae"}]}]}}],"versions":["n9.1-dev","n8.2-dev","n8.1-dev","n7.2-dev","n7.1-dev","n6.2-dev","n6.1-dev","n5.2-dev","n5.1-dev","n4.5-dev","n4.4-dev","n4.3-dev","n4.2-dev","n4.1-dev","n3.5-dev","n3.4-dev","n3.3-dev","n3.2-dev","n3.1-dev","n2.9-dev","n2.8-dev","n2.7-dev","n2.6-dev","n2.5-dev","n2.4-dev","n2.3-dev","n2.2-dev","n2.0","n2.1-dev","n1.3-dev","n1.2-dev","n1.1-dev","n0.12-dev","n0.11-dev","n0.8","N"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-125250.json","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/ffmpeg/ffmpeg/commit/26c2980980295e5516f308c5a2792d2a72e43eae","target":{"function":"gif_image_write_image","file":"libavcodec/gif.c"},"deprecated":false,"digest":{"function_hash":"221123983460692987570543055208232648060","length":4178},"id":"CVE-2026-125250-0ef1c029","signature_type":"Function"},{"source":"https://github.com/ffmpeg/ffmpeg/commit/26c2980980295e5516f308c5a2792d2a72e43eae","target":{"file":"libavcodec/gif.c"},"deprecated":false,"digest":{"line_hashes":["36468979121099575724523261843435269543","270830247770637688633227063408260064338","232233041140560667668235866956547729755","310258666630273572019645782428391900241","82684942187303027187106609057605250667","39987151744888742579833913294252086103","284589390085532516436419269706954937300","215266753919063137795660233414962965882","74809645863065779610174860727881429201","209750119463224970548919651394366933857","253994723460832659750910957520854106415","234539583103218292625562390397387208408","331085393281656999726456921892042406193","84537683864721812267339397643773869931","229509506378460390575648891985802396255","185852752426832912686662292480166967540","100032862010776288262532042004569533434","26807228340475334580545499497490171424","227630210045546845823635589046761131098","334293215979931751537287458722636008683","10394053427158108150946711286155754770","269496742009729424958024075982796053612","117138811024835212583273710546729537264","107556347136933712478506735090195373738","285459882385471055622533121072673098770"],"threshold":0.9},"id":"CVE-2026-125250-7c90c8c0","signature_type":"Line","signature_version":"v1"}],"vanir_signatures_modified":"2026-11-15T07:04:17Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}