Skip to main content

FFmpeg CVE-2026-125227

| EUVDEUVD-2026-120177 HIGH
Integer Overflow or Wraparound (CWE-190)
2026-11-09 disclosure@vulncheck.com GHSA-f527-xpw9-mvpf
7.3
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft MJPEG/JPEG with 512+ MiB scan
  2. Delivery
    Victim transcodes via CBS filter_units bsf
  3. Exploit
    Integer overflow in cbs_jpeg_write_scan()
  4. Execution
    Heap buffer overflow on 32-bit build
  5. Impact
    Heap 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

FFmpeg 0 ≤9.0.2

Affected Packages

euvd ffmpeg no fix

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

Vendor (vulncheck) PRIMARY 7.3 HIGH
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
vuln.today AI 7.0 HIGH

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.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 7.0 MEDIUM

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: Medium
Compensating Controls

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

EPSS Score
0.1%
Top 96% exploitable
Prevalence
Ubiquitous
FFmpeg libavcodec is embedded in countless media apps, servers, and tools
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Medium

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

More in Ffmpeg

View all
CVE-2016-1897 MEDIUM POC
5.5 Jan 15

FFmpeg 2.x allows remote attackers to conduct cross-origin attacks and read arbitrary files by using the concat protocol

CVE-2017-9993 HIGH
7.5 Jun 28

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

CVE-2016-1898 MEDIUM POC
5.5 Jan 15

FFmpeg 2.x allows remote attackers to conduct cross-origin attacks and read arbitrary files by using the subfile protoco

CVE-2013-4265 CRITICAL POC
10.0 Nov 23

The av_reallocp_array function in libavutil/mem.c in FFmpeg before 2.0.1 has an unspecified impact and remote vectors re

CVE-2020-12284 CRITICAL POC
9.8 Apr 28

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

CVE-2026-58049 HIGH POC
8.8 Jun 28

Out-of-bounds heap write in FFmpeg's RASC video decoder (decode_dlta in libavcodec/rasc.c) allows attackers to corrupt m

CVE-2026-30754 HIGH POC
8.8 Sep 08

Memory corruption in FFmpeg before 8.1 allows an attacker who can supply a crafted H.264/HEVC media file to corrupt heap

CVE-2025-25469 HIGH POC
8.8 Feb 18

Memory exhaustion in FFmpeg git-master builds before commit d5873b can occur when a victim processes attacker-controlled

CVE-2021-38094 HIGH POC
8.8 Sep 20

Integer Overflow vulnerability in function filter_sobel in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attacker

CVE-2021-38093 HIGH POC
8.8 Sep 20

Integer Overflow vulnerability in function filter_robert in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attacke

CVE-2021-38092 HIGH POC
8.8 Sep 20

Integer Overflow vulnerability in function filter_prewitt in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attack

CVE-2021-38091 HIGH POC
8.8 Sep 20

Integer Overflow vulnerability in function filter16_sobel in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows attack

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy