---
id: "CVE-2026-125099"
page: "https://infrastack.ai/live/CVE-2026-125099"
kind: "vulnerability"
aliases: ["CVE-2026-125099"]
title: "FFmpeg: crafted GEM image leaks uninitialized heap memory into decoded frames"
severity: "medium"
cvss: 4.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ffmpeg", "image-processing", "libavcodec", "package"]
not_affected_if: ["trusted-input-only"]
published_at: "2026-11-09T19:16:50+00:00"
first_seen_at: "2026-11-09T19:28:15+00:00"
updated_at: "2026-11-09T19:33:36+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125099", "first_seen_at": "2026-11-09T19:28:15+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted GEM image leaks uninitialized heap memory into decoded frames

Link for people: https://infrastack.ai/live/CVE-2026-125099 (this .md is for agents)

FFmpeg's GEM raster image decoder in libavcodec/gemdec.c leaves row-buffer bytes uninitialized when handling SKIP or pattern opcodes. A crafted GEM .img file can copy uninitialized heap memory into decoded frames, disclosing heap contents.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed FFmpeg version with `ffmpeg -version`; the sources say versions through `9.0.2` are affected
- Look for applications that decode untrusted GEM `.img` files through FFmpeg or libavcodec
- Fixed version: unknown

## Fix

- Patch available on the upstream FFmpeg project; the sources do not name a fixed version number

## Timeline

- 2026-11-09T19:28:15+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125099

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-uninitialized-memory-disclosure-via-gem-raster-decoder
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/e578999fa3c5f7efac1ea70bb7c2a7682013c7c9

## From the sources

FFmpeg through 9.0.2 contains an uninitialized memory disclosure vulnerability in the GEM raster image decoder in libavcodec/gemdec.c that exposes uninitialized row-buffer bytes. Attackers can supply a crafted GEM .img image using SKIP or pattern opcodes to copy uninitialized heap memory into decoded frames, disclosing heap contents.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
