FFmpeg through 9.0.2 contains a heap buffer overflow vulnerability in the APNG encoder's encode_apng() function in libavcodec/pngenc.c when frame size changes mid-stream. Attackers can supply crafted media whose resolution grows mid-stream, causing APNG_DISPOSE_OP_BACKGROUND memset writes past prev_frame and crashing or corrupting heap memory in transcoding applications.
{
"license": "CC-BY-4.0",
"sources": [
{
"affected": {
"ffmpeg:ffmpeg": [
"<= 9.0.2"
]
},
"database_specific": {
"status": "Analyzed"
},
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125218",
"id": "CVE-2026-125218",
"imported": "2026-12-02T20:13:53.425Z",
"modified": "2026-11-30T15:54:56.253Z",
"published": "2026-11-09T19:16:59.043Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-125218"
},
{
"html_url": "https://github.com/advisories/GHSA-hp56-qgqc-859j",
"id": "GHSA-hp56-qgqc-859j",
"imported": "2026-12-02T20:14:13.115Z",
"modified": "2026-11-09T21:32:05Z",
"published": "2026-11-09T21:31:58Z",
"url": "https://api.github.com/advisories/GHSA-hp56-qgqc-859j"
},
{
"affected": {
"FFMPEG:FFmpeg": [
"0 ≤9.0.2"
]
},
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-120307",
"id": "EUVD-2026-120307",
"imported": "2026-12-02T20:13:54.772Z",
"modified": "2026-11-13T12:58:34Z",
"published": "2026-11-09T19:11:33Z",
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2026-120307"
}
]
}