Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft MJPEG/JPEG with 512+ MiB scan
-
DeliveryVictim transcodes via CBS filter_units bsf
-
ExploitInteger overflow in cbs_jpeg_write_scan()
-
ExecutionHeap buffer overflow on 32-bit build
-
ImpactHeap corruption or application crash
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires all of: (1) a 32-bit FFmpeg build - 64-bit builds are not reported affected because the integer overflow depends on 32-bit arithmetic width; (2) processing the input through CBS JPEG bitstream filtering, e.g. the filter_units bitstream filter invoking cbs_jpeg_write_scan(); and (3) a crafted MJPEG/JPEG stream whose scan segment is 512 MiB or larger, which is what overflows 'scan->data_size * 8'. Limiting factors that reduce real-world risk: the attack vector is local (AV:L) and needs passive user interaction (UI:P) - a victim must process the malicious file - and the 32-bit-build and half-gigabyte-scan prerequisites exclude typical 64-bit production deployments and pipelines that do not route JPEG through CBS bitstream filters. |
| Impact | Signals point to a moderate, build-specific memory-safety issue rather than a widespread emergency. The CVSS 4.0 vector (AV:L/AC:H/AT:P/PR:N/UI:P) describes a local attack that requires a specific attack condition (AT:P) and passive user interaction (UI:P) - consistent with a victim processing an attacker-supplied media file through FFmpeg's CBS JPEG bitstream filter path, not a remotely reachable network service. The vuln.today priority is 'this_week', which argues for prompt but non-emergency patching. No CISA KEV entry is present (not actively exploited per available data), and no EPSS score was supplied, so widespread automated exploitation probability cannot be quantified from the input. The references include the upstream fix commit and a VulnCheck advisory, but no verified exploit code - so this is 'no public exploit identified at time of analysis.' A key scoping caveat: the description explicitly limits the heap overflow to 32-bit builds and to streams with a scan of 512 MiB or more, so despite FFmpeg's ubiquity the actually-affected population is narrower than the raw CVSS CRITICAL impact (VC/VI/VA:H) implies. Confirmed impact from the sources is heap corruption or application crash; reliable code execution is plausible for a heap overflow but is not demonstrated in the supplied evidence. |
| Exploit ScenarioDerived | An attacker crafts an MJPEG/JPEG stream containing a scan segment of 512 MiB or larger and gets a victim running a 32-bit FFmpeg build to process it through a CBS bitstream filter such as filter_units (e.g. during remux/transcode of untrusted media). The integer overflow in cbs_jpeg_write_scan() mis-sizes the output buffer, producing a heap buffer overflow that crashes the application or corrupts heap memory. No public working exploit is identified in the provided data; references cover only the fix commit and vendor advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 09, 2026
Heap buffer overflow in FFmpeg's CBS JPEG bitstream writer (cbs_jpeg_write_scan() in libavcodec/cbs_jpeg.c) affects 32-bit builds through version 9.0.2 when a crafted MJPEG/JPEG stream carrying a scan segment of 512 MiB or more is passed through CBS bitstream filters such as filter_units. The overflow lets the bitstream data corrupt adjacent heap memory or crash the process, with high impact on confidentiality, integrity and availability of the affected application. Exploitation requires the victim to process a malicious file locally (AV:L, UI:P), and no public exploit or in-the-wild activity has been identified at time of analysis; an upstream fix commit is available.
RemediationAI
Apply the upstream fix commit b89ce54d93bf644433dfa9fbc34f19c22237691a (PR 25232), which replaces the overflowing multiply-and-compare with a division-based bounds check; the evidence identifies this as an upstream commit fix and does not confirm a tagged release containing it, so verify the patched status of whatever FFmpeg release or distribution package you deploy rather than assuming a version number. Order of work: identify 32-bit FFmpeg builds first, since 64-bit builds are not reported affected. If an immediate rebuild is not possible, the effective compensating control is to stop routing untrusted JPEG/MJPEG input through CBS bitstream filters such as filter_units, or to reject scan segments of 512 MiB or more before they reach the bitstream filter layer; both approaches remove the reachable code path but reduce functionality for workflows that legitimately rely on CBS-based JPEG rewriting or on very large scans. Migrating affected 32-bit deployments to 64-bit builds also sidesteps the flaw, at the cost of platform and memory-footprint changes. Refer to https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25232 and https://github.com/FFmpeg/FFmpeg/commit/b89ce54d93bf644433dfa9fbc34f19c22237691a for the change details.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
FFmpeg's coded bitstream (CBS) framework parses and rewrites structured bitstreams so that bitstream filters like filter_units can split, merge or validate packets. In cbs_jpeg_write_scan(), the writer validated the output buffer space with the expression 'scan->data_size * 8 > put_bits_left(pbc)'. On 32-bit builds that multiplication is performed with 32-bit width, so a scan size of 512 MiB or larger wraps around (CWE-190 integer overflow), the size check passes when it should fail, and the subsequent write of scan bytes into the PutBitContext exceeds the allocated heap buffer. The root cause is an unchecked arithmetic overflow in a bounds check rather than a flaw in JPEG parsing itself. The upstream fix (commit b89ce54d93bf644433dfa9fbc34f19c22237691a, tracked as PR 25232) restates the comparison as 'scan->data_size > put_bits_left(pbc) / 8', removing the overflowing multiplication. 64-bit builds are not reported affected because the arithmetic width does not overflow there, and the flaw is only reachable through paths that invoke the CBS JPEG writer, not through ordinary decoding.
Know when Ffmpeg gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Local file-processing path (AV:L) needing a victim to process the file (UI:R); AC:H for the 32-bit-build plus 512 MiB-scan prerequisites; impacts reflect heap-corruption potential, with crash confirmed and code execution plausible.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
DescriptionCVE.org
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.
Executive ViewAI
A heap buffer overflow in FFmpeg's CBS JPEG bitstream writer (CVE-2026-125227) affects 32-bit builds through version 9.0.2, allowing a maliciously crafted MJPEG/JPEG file to corrupt adjacent heap memory or crash the process. This poses a risk to any application, service, or pipeline that processes user-supplied media files using the affected 32-bit FFmpeg builds, potentially leading to data leakage, service disruption, or arbitrary code execution.
No vendor-released patch identified at time of analysis; however, an upstream fix commit is available. Apply the upstream fix commit as a temporary patch where possible. Restrict processing of untrusted MJPEG/JPEG files through CBS bitstream filters by enforcing size limits (reject scan segments ≥512 MiB) and validate file inputs. Migrate to 64-bit builds to avoid the 32-bit-specific overflow. Use sandboxing and heap protections for media processing services.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
FFmpeg 2.x allows remote attackers to conduct cross-origin attacks and read arbitrary files by using the concat protocol
FFmpeg before 2.8.12, 3.0.x and 3.1.x before 3.1.9, 3.2.x before 3.2.6, and 3.3.x before 3.3.2 does not properly restric
FFmpeg 2.x allows remote attackers to conduct cross-origin attacks and read arbitrary files by using the subfile protoco
The av_reallocp_array function in libavutil/mem.c in FFmpeg before 2.0.1 has an unspecified impact and remote vectors re
cbs_jpeg_split_fragment in libavcodec/cbs_jpeg.c in FFmpeg 4.1 and 4.2.2 has a heap-based buffer overflow during JPEG_MA
Out-of-bounds heap write in FFmpeg's RASC video decoder (decode_dlta in libavcodec/rasc.c) allows attackers to corrupt m
Memory corruption in FFmpeg before 8.1 allows an attacker who can supply a crafted H.264/HEVC media file to corrupt heap
Memory exhaustion in FFmpeg git-master builds before commit d5873b can occur when a victim processes attacker-controlled
Integer Overflow vulnerability in function filter_sobel in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attacker
Integer Overflow vulnerability in function filter_robert in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attacke
Integer Overflow vulnerability in function filter_prewitt in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attack
Integer Overflow vulnerability in function filter16_sobel in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attack
EUVD-2026-120177
GHSA-f527-xpw9-mvpf
NVD
CVE.org
EPSS
Exploit-DB