---
id: "CVE-2026-125178"
page: "https://infrastack.ai/live/CVE-2026-125178"
kind: "vulnerability"
aliases: ["CVE-2026-125178"]
title: "FFmpeg: crafted AVI file causes out-of-bounds heap read in TDSC decoder"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["ffmpeg", "libavcodec", "media-processing", "package"]
not_affected_if: ["no-tdsc-decoding", "trusted-input-only"]
published_at: "2026-11-09T19:16:52+00:00"
first_seen_at: "2026-11-09T19:28:16+00:00"
updated_at: "2026-11-09T19:30:20+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125178", "first_seen_at": "2026-11-09T19:28:16+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted AVI file causes out-of-bounds heap read in TDSC decoder

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

FFmpeg's TDSC cursor decoder stores cursor dimensions before validating them, so a crafted AVI file can make it read past a heap buffer. An attacker can crash the decoder or leak heap memory into decoded frames.

_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`, and compare it with the ranges in the NVD entry.
- Check whether your pipeline decodes untrusted AVI files with the TDSC codec.

## Fix

- Move to a fixed FFmpeg release; the fixed version is not stated in the sources provided. Patch reference: github.com (linked fix).

## Timeline

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

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-out-of-bounds-heap-read-via-tdsc-cursor-dimensions
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/12c589a37d093cc55618f8377b092dc21416806f

## From the sources

FFmpeg through 9.0.2 contains an out-of-bounds heap read vulnerability in tdsc_load_cursor() in libavcodec/tdsc.c, which stores cursor dimensions before validating them. Attackers can supply a crafted AVI file with oversized TDSC cursor dimensions so tdsc_paint_cursor() reads past the cursor buffer, crashing the decoder or leaking heap memory into frames.

---

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