---
id: "CVE-2026-120245"
kind: "vulnerability"
aliases: ["CVE-2026-120245"]
title: "FFmpeg: truncated Sun Raster images leak stale heap memory into decoded output"
severity: "medium"
cvss: 6.8
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ffmpeg", "libavcodec", "media-processing", "package"]
not_affected_if: ["no-sunraster-decoding", "trusted-input-only"]
published_at: "2026-11-01T01:17:17+00:00"
first_seen_at: "2026-11-01T01:47:22+00:00"
updated_at: "2026-11-01T01:47:40+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120245", "first_seen_at": "2026-11-01T01:47:22+00:00"}]
---

# FFmpeg: truncated Sun Raster images leak stale heap memory into decoded output

FFmpeg versions 0.10 through 9.0.2 leave a temporary bitmap uninitialized when decoding truncated 1-bit and 4-bit paletted Sun Raster images. An attacker who supplies a crafted truncated file can read leftover heap contents, such as allocator data, in the decoded output.

_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`
- Look for FFmpeg builds in services that decode untrusted media, such as upload or thumbnail pipelines
- Check whether the bundled libavcodec is the affected build, since other packages may ship their own copy

## Fix

- Move FFmpeg to a version later than `9.0.2`; the sources do not name the exact fixed release

## Timeline

- 2026-11-01T01:47:22+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120245

## From the sources

FFmpeg 0.10 through 9.0.2 contains a use of uninitialized resource vulnerability in sunrast_decode_frame() that leaks heap memory when decoding truncated 1-bit and 4-bit paletted Sun Raster images. Attackers can craft a truncated Sun Raster file so the uncleared temporary bitmap is expanded into PAL8 pixels, exposing stale heap contents such as allocator words in decoded output.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
