Skip to main content

FFmpeg GIF encoder EUVDEUVD-2026-120200

| CVE-2026-125250 HIGH
Heap-based Buffer Overflow (CWE-122)
2026-11-09 disclosure@vulncheck.com GHSA-gm97-rxv6-cv4g
8.5
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

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

  1. Access
    Craft PAL8 video with growing linesize
  2. Exploit
    Victim transcodes input to GIF
  3. Execution
    Later frame overflows undersized shrunk_buf
  4. Impact
    Heap corruption and potential 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

Exploitation requires FFmpeg to transcode attacker-controlled input into GIF using the GIF encoder (libavcodec/gif.c). The malicious input must be PAL8 (8-bit palette) video, and the per-frame linesize must GROW mid-stream so that a later frame exceeds the shrunk_buf allocation sized from the first frame. Limiting factors: the vulnerable code path is only reached when the GIF encoder is invoked (AV:L - the hostile file is processed locally), and passive user/service interaction is required to start the transcode (UI:P); no authentication is needed (PR:N). Deployments that never transcode untrusted media to GIF, or never use FFmpeg's GIF encoder, are not exposed.

Impact

This is a legitimate but not emergency-tier priority. The input CVSS 4.0 vector (CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H, score 8.5) describes a local, low-complexity, unauthenticated-but-user-interaction-dependent heap overflow with high confidentiality, integrity and availability impact and no scope change. The attack vector is local (AV:L) because exploitation requires the victim to process an attacker-supplied media file, and UI:P reflects that passive victim action (initiating a GIF transcode) is required - this is a file-parsing/transcoding bug, not a remotely reachable network service. No EPSS score, no CISA KEV listing, and no public exploit code are present in the supplied intelligence, so there is no evidence of active exploitation or weaponization; the only exploitation-relevant artifacts are the upstream fix commit, a pull request, and a VulnCheck advisory. The vuln.today decision label is 'this_week', consistent with a serious memory-corruption flaw in ubiquitous software that nonetheless requires a victim to transcode hostile input and is not yet known to be exploited. Net: real and worth patching promptly because FFmpeg is everywhere and the impact is memory corruption, but current signals point to no in-the-wild activity rather than a drop-everything scenario. Note the local vector should not be misread as needing shell access - it means the malicious input is processed locally.

Exploit ScenarioDerived

An attacker crafts a malicious PAL8 (8-bit palette) video whose per-frame linesize increases mid-stream and submits it to any service or user that transcodes untrusted video into GIF with FFmpeg. When the GIF encoder processes the larger later frame, remap_frame_to_palette() writes past shrunk_buf - which was sized from the first frame's smaller linesize - corrupting the heap and potentially enabling code execution in the transcoding process. No public exploit identified at time of analysis; only the vendor fix commit and a VulnCheck advisory are available.

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

A heap buffer overflow in FFmpeg's GIF encoder (gif_image_write_image() in libavcodec/gif.c) affects builds through 9.0.2 and lets attacker-controlled media corrupt heap memory when it is transcoded to GIF. The crafted input must be PAL8 (8-bit palette) video whose per-frame linesize grows mid-stream, so a later frame overruns the shrunk_buf scratch allocation that was sized from the first frame's linesize. Reaching the flaw requires FFmpeg to be invoked locally to encode untrusted content as GIF (local attack vector, no privileges needed, some user or service interaction to start the transcode), so deployments that never transcode hostile media to GIF are not exposed; no confirmed active exploitation (CISA KEV) or public exploit code was identified in the available sources, and an upstream fix commit exists but a tagged patched release is not independently confirmed.

RemediationAI

Apply the upstream fix commit 26c2980980295e5516f308c5a2792d2a72e43eae (or its equivalent in the branch you ship), which sizes shrunk_buf as avctx->height * avctx->width and writes with ptr_linesize = avctx->width instead of the frame linesize; the change is associated with upstream pull request https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/25690 and a released patched version beyond 9.0.2 is not independently confirmed in the available data, so verify the fix is present in the exact build or distro package you deploy before relying on a version number. Until that is verified, the exposure is limited to the GIF encoding path: avoid transcoding untrusted or user-supplied media into GIF with FFmpeg's native GIF encoder, or route such conversions through a separately isolated, resource-limited worker so a heap corruption cannot reach a privileged or shared process; where GIF output is not a business requirement, disable that output path entirely. Note that filtering is unreliable here because the trigger depends on a mid-stream change in the per-frame linesize of a PAL8 stream rather than on an obvious container or codec marker, so input allow-listing or re-encoding through a trusted pipeline should be preferred over signature-based blocking, and any such control carries the trade-off of rejecting or re-encoding legitimate palette-based sources. Monitor the vendor advisory at https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-gif-encoder-heap-buffer-overflow-via-shrunk-buf-remap and the FFmpeg repository at https://github.com/FFmpeg/FFmpeg for a tagged release containing the fix.

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 GIF encoder is implemented in libavcodec/gif.c. Before writing a frame, gif_image_write_image() allocates a scratch buffer (shrunk_buf) used by remap_frame_to_palette() to translate the source pixel format into the GIF palette, and it previously sized that buffer as avctx->height * linesize using the linesize of the frame being written. Because linesize is a per-frame property, a PAL8 stream whose frame stride grows partway through the encode yields a later frame whose stride exceeds the value used at allocation time; remap_frame_to_palette() then writes with the larger stride into the smaller buffer, producing an out-of-bounds heap write classified as CWE-122 (heap-based buffer overflow). The upstream fix commit 26c2980980295e5516f308c5a2792d2a72e43eae changes the allocation to avctx->height * avctx->width and introduces a separate ptr_linesize variable set to avctx->width, so both the buffer size and the write stride are derived from the frame geometry rather than the first frame's linesize; the affected code is visible at libavcodec/gif.c#L405 in the n9.0.2 tag. This is a memory-safety defect in the encoder, not in any specific container or muxer, and exploitation is bounded by the need to run the GIF encoding path on hostile PAL8 input.

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

Hostile file is processed locally (AV:L) and a victim must initiate the GIF transcode (UI:R); no auth needed (PR:N); heap corruption plausibly yields full code execution, so C/I/A:H.

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

Primary rating from Vendor (vulncheck).

CVSS VectorVendor: vulncheck

Attack Vector
Local
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 9.0.2 contains a heap buffer overflow in the GIF encoder's gif_image_write_image() in libavcodec/gif.c because shrunk_buf is sized from the first frame's linesize. Attackers can supply PAL8 video whose frame linesize grows mid-stream, causing remap_frame_to_palette() to write past shrunk_buf and corrupt the heap during GIF transcoding.

Executive ViewAI

Why It Matters

A heap buffer overflow vulnerability in FFmpeg's GIF encoder affects versions through 9.0.2, enabling memory corruption when untrusted media is transcoded to GIF. This impacts organizations that transcode external or user-supplied video to GIF, such as media processing pipelines, social platforms, and content conversion services. Leadership should prioritize because exploitation could lead to code execution or denial of service, though no active exploitation has been observed.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include disabling GIF encoding for untrusted sources, validating input media to reject PAL8 streams with variable linesize, running FFmpeg in a sandboxed environment with limited privileges, and monitoring for anomalous behavior.

Threat Intelligence Overview

EPSS Score
0.1%
Top 96% exploitable
Prevalence
Ubiquitous
FFmpeg is the de facto media library embedded across servers, apps and platforms
Data Quality
6 sources
Confidence: High

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
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact
High

Priority Score

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

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