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.
{
"cna_assigner": "VulnCheck",
"cwe_ids": [
"CWE-190"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/125xxx/CVE-2026-125227.json"
}{
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"last_affected": "9.0.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandardRange"
},
{
"range": [
{
"fixed": "b89ce54d93bf644433dfa9fbc34f19c22237691a"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-125227.json"
[
{
"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"
}
},
{
"deprecated": false,
"digest": {
"line_hashes": [
"313380191973130139735270825567573539981",
"215321070839126524754520987227781857164",
"21442741961667172847953347187764681460",
"208272691971787942108892567431955994573"
],
"threshold": 0.9
},
"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"
}
}
]
"2026-11-12T07:06:23Z"