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.
{
"cna_assigner": "VulnCheck",
"cwe_ids": [
"CWE-122"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125250.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"last_affected": "9.0.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"fixed": "26c2980980295e5516f308c5a2792d2a72e43eae"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-125250.json"
[
{
"deprecated": false,
"digest": {
"function_hash": "221123983460692987570543055208232648060",
"length": 4178
},
"id": "CVE-2026-125250-0ef1c029",
"signature_type": "Function",
"signature_version": "v1",
"source": "https://github.com/ffmpeg/ffmpeg/commit/26c2980980295e5516f308c5a2792d2a72e43eae",
"target": {
"file": "libavcodec/gif.c",
"function": "gif_image_write_image"
}
},
{
"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",
"source": "https://github.com/ffmpeg/ffmpeg/commit/26c2980980295e5516f308c5a2792d2a72e43eae",
"target": {
"file": "libavcodec/gif.c"
}
}
]
"2026-11-15T07:04:17Z"