{"id":"CVE-2026-125227","summary":"FFmpeg through 9.0.2 Heap Buffer Overflow via cbs_jpeg_write_scan Integer Overflow","details":"FFmpeg through 9.0.2 contains an integer overflow in cbs_jpeg_write_scan() in libavcodec/cbs_jpeg.c that causes a heap buffer overflow on 32-bit builds. Attackers can supply a crafted MJPEG/JPEG stream with a scan of 512 MiB or more, processed by CBS bitstream filters like filter_units, to corrupt the heap or crash the application.","modified":"2026-11-12T07:06:23.098834649Z","published":"2026-11-09T19:11:40.151Z","database_specific":{"cwe_ids":["CWE-190"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125227.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-125227.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-125227"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-heap-buffer-overflow-via-cbs-jpeg-write-scan-integer-overflow"},{"type":"REPORT","url":"https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25232"},{"type":"FIX","url":"https://github.com/FFmpeg/FFmpeg/commit/b89ce54d93bf644433dfa9fbc34f19c22237691a"},{"type":"PACKAGE","url":"https://github.com/FFmpeg/FFmpeg"},{"type":"ARTICLE","url":"https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/cbs_jpeg.c#L299"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/ffmpeg/ffmpeg","events":[{"introduced":"0"},{"fixed":"b89ce54d93bf644433dfa9fbc34f19c22237691a"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StandardRange","range":[{"introduced":"0"},{"last_affected":"9.0.2"}]},{"source":"REFERENCES_COMMIT","range":[{"fixed":"b89ce54d93bf644433dfa9fbc34f19c22237691a"}]}]}}],"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":{"vanir_signatures_modified":"2026-11-12T07:06:23Z","source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-125227.json","vanir_signatures":[{"deprecated":false,"digest":{"function_hash":"196230651841501037251126650371578390896","length":484},"id":"CVE-2026-125227-2774f555","signature_type":"Function","signature_version":"v1","source":"https://github.com/ffmpeg/ffmpeg/commit/b89ce54d93bf644433dfa9fbc34f19c22237691a","target":{"file":"libavcodec/cbs_jpeg.c","function":"cbs_jpeg_write_scan"}},{"id":"CVE-2026-125227-6828b42f","signature_type":"Line","signature_version":"v1","source":"https://github.com/ffmpeg/ffmpeg/commit/b89ce54d93bf644433dfa9fbc34f19c22237691a","target":{"file":"libavcodec/cbs_jpeg.c"},"deprecated":false,"digest":{"line_hashes":["313380191973130139735270825567573539981","215321070839126524754520987227781857164","21442741961667172847953347187764681460","208272691971787942108892567431955994573"],"threshold":0.9}}]}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}