Skip to main content

FFmpeg CVE-2026-66040

| EUVDEUVD-2026-48742 HIGH
Heap-based Buffer Overflow (CWE-122)
2026-07-24 VulnCheck
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Recon
    Craft PNG with aliased IFD eXIf entries
  2. Delivery
    Upload/deliver crafted file to FFmpeg pipeline
  3. Exploit
    Trigger PNG/APNG encode operation
  4. Install
    `add_exif_profile_size()` underestimates buffer
  5. C2
    `png_write_chunk()` writes past heap boundary
  6. Execute
    Heap corruption
  7. Impact
    Process crash or code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
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

The vulnerable code path is reached only when FFmpeg encodes a PNG or APNG file and the input carries an eXIf chunk containing multiple IFD entries that alias (reference) the same large value payload at the same TIFF offset. Exploitation therefore requires the attacker to control or inject content that FFmpeg subsequently encodes into PNG/APNG format - the most common exposure being a web service or pipeline that accepts user-uploaded images and re-encodes them with FFmpeg. The CVSS UI:P signal confirms some form of indirect triggering (a user or automated process invoking FFmpeg on attacker input) rather than a fully autonomous exploit. Factors that limit exploitation: FFmpeg must be invoked in an encoding (write) path, not just decoding; the eXIf chunk must survive any pre-processing steps; and the aliased IFD structure must be preserved through any normalisation layers before reaching add_exif_profile_size(). Deployments that do not encode PNG/APNG output, or that strip EXIF before encoding, are not affected.

Impact

The CVSS 4.0 score of 8.7 (AV:N/AC:L/AT:N/PR:N/UI:P) is broadly consistent with the technical description: network-accessible, low complexity, no privileges, but user interaction required to cause FFmpeg to process the crafted file. The VC:H/VI:H/VA:H impact metrics reflect the deterministic heap corruption. SSVC rates automatable as 'no' - consistent with the UI:P signal - while Technical Impact is 'total', aligning with the RCE potential. EPSS at 0.55% (43rd percentile) indicates low current exploitation activity, and there is no CISA KEV entry or public exploit. The mismatch between SSVC 'total' impact and low EPSS is explained by the requirement for user interaction: FFmpeg must actually be invoked on attacker-supplied input. In batch media transcoding pipelines or web services that accept user-uploaded images and re-encode them, that user-interaction bar can be programmatically crossed, converting the theoretical risk into an operationally viable one. The deterministic nature of the corruption (noted by VulnCheck) is a differentiating factor - heap overflows of this magnitude are often exploitable without heap spray on systems lacking mature mitigations.

Exploit ScenarioDerived

An attacker uploads a crafted PNG image to a web service that accepts user content and re-encodes it using FFmpeg (e.g., a thumbnail generator or media platform transcoder). The PNG contains an eXIf chunk with dozens of IFD entries all pointing to the same large offset payload; when FFmpeg's PNG encoder serialises this canonically, it writes tens of thousands of bytes past the heap buffer boundary. Depending on heap layout and platform mitigations, this causes a process crash or, in a favourable heap arrangement, overwrites adjacent allocations to gain code execution within the FFmpeg worker process. No public exploit exists at time of analysis, but VulnCheck's advisory notes the corruption is deterministic, lowering the reliability bar for weaponisation.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.5% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 16, 2026

Heap out-of-bounds write in FFmpeg's native PNG and APNG encoders (all versions through 8.1.2) allows remote attackers who can supply a crafted PNG image to cause deterministic heap corruption and a potential arbitrary code execution primitive. The root cause is add_exif_profile_size() underestimating the required output buffer when multiple EXIF IFD entries share a large value payload - canonical serialization expands the deduplicated entries back to full size, causing png_write_chunk() to write tens of thousands of bytes past the allocated boundary. No public exploit exists and EPSS places exploitation probability at 0.55%, but VulnCheck reports the heap corruption is deterministic, elevating the eventual RCE risk.

RemediationAI

Apply upstream commit b506fafec9a19fcbc2be5271875fd4a63d6615bc (referenced by PR https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23786), which corrects the size estimation in add_exif_profile_size() to properly account for canonical IFD serialization expansion. Until the fix is incorporated into a tagged release and packaged by downstream distributions, operators can apply the patch manually or build FFmpeg from HEAD. As a compensating control for services that accept user-supplied PNG images and re-encode them, strip EXIF metadata from uploaded files before passing them to FFmpeg - tools such as ExifTool or libvips can remove eXIf chunks pre-encoding, eliminating the malicious payload path. This has a minor trade-off of losing embedded EXIF data in output files. If EXIF passthrough is a business requirement, consider sandboxing FFmpeg processes with strict heap limits or a seccomp policy so a crash fails closed rather than enabling code execution.

Affected VersionsENISA

FFmpeg 0 ≤8.1.2
FFmpeg patch: b506fafec9a19fcbc2be5271875fd4a63d6615bc

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 (cpe:2.3:a:ffmpeg:ffmpeg:*:*:*:*:*:*:*:*) is a C-based multimedia framework whose PNG/APNG encoder implements native EXIF embedding. An eXIf ancillary chunk in PNG carries an embedded TIFF/EXIF IFD structure. The encoder's add_exif_profile_size() function estimates required buffer space for the serialised IFD, but fails to account for canonical serialization that expands entries when multiple IFD entries reference the same large offset value payload - a legal TIFF structure. The result is a CWE-122 heap-based buffer overflow: png_write_chunk() writes the full canonical output into a fatally undersized heap allocation. Because the overflow is proportional to the number of aliased IFD entries, an attacker can drive overflow magnitude to tens of thousands of bytes deterministically, making this far more dangerous than a speculative off-by-one.

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 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 8.8 HIGH

Network-delivered crafted file, low complexity once crafted, no privileges needed, requires a user/process to invoke FFmpeg encoding; no scope change; full C/I/A impact consistent with deterministic heap corruption and RCE potential.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
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 8.1.2, fixed in commit b506faf, contains a heap out-of-bounds write vulnerability in the native PNG and APNG encoders that allows remote attackers to corrupt heap memory by supplying a crafted PNG image with a malicious eXIf chunk. Attackers can craft an eXIf chunk where multiple IFD entries reference the same large value payload, causing canonical serialization to expand the output far beyond the undersized allocation estimated by add_exif_profile_size(), resulting in png_write_chunk() writing tens of thousands of bytes past the buffer boundary, leading to deterministic heap corruption, process crash, and potentially arbitrary code execution.

Executive ViewAI

Why It Matters

FFmpeg's PNG and APNG encoders (versions through 8.1.2) contain a heap buffer overflow enabling remote code execution through specially crafted image files. Organizations using FFmpeg for media processing-particularly those handling user-uploaded or third-party images-face risk of system compromise and unauthorized code execution through automated image encoding pipelines.

Business Impact: High
Compensating Controls

Apply vendor patch. If immediate patching is not feasible, disable PNG and APNG encoder functionality where operationally acceptable, restrict PNG file ingestion to authenticated users with strict content validation, implement network segmentation to isolate image processing systems, and enable detailed alerting on image encoding service anomalies and crashes to detect exploitation attempts.

Threat Intelligence Overview

EPSS Score
0.5%
Top 57% exploitable
Prevalence
High
FFmpeg powers the vast majority of video/media transcoding pipelines globally
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL VulDB

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.5%
Patch available Yes
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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
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.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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

CVE-2021-38090 HIGH POC
8.8 Sep 20

Integer Overflow vulnerability in function filter16_roberts in libavfilter/vf_convolution.c in Ffmpeg 4.2.1, allows atta

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Desktop Applications 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Package Hub 15 SP7 Not-Affected

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