---
id: "CVE-2026-125209"
page: "https://infrastack.ai/live/CVE-2026-125209"
kind: "vulnerability"
aliases: ["CVE-2026-125209"]
title: "FFmpeg: crafted subtitle files overflow heap memory during DVD transcoding"
severity: "high"
cvss: 8.5
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["ffmpeg", "media-processing", "runtime", "self-hosted"]
not_affected_if: ["dvdsub-encoder-unused", "no-untrusted-media"]
published_at: "2026-11-09T19:16:57+00:00"
first_seen_at: "2026-11-09T19:28:18+00:00"
updated_at: "2026-11-09T19:29:33+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125209", "first_seen_at": "2026-11-09T19:28:18+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted subtitle files overflow heap memory during DVD transcoding

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

FFmpeg's DVD subtitle encoder underestimates the output size for odd-width bitmap subtitle rectangles, causing a heap buffer overflow. An attacker who supplies a crafted bitmap subtitle file can corrupt heap memory when it is transcoded to dvdsub.

_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`; affected builds are before `8.1.3` on the 8.x line and before `9.0.2` on the 9.x line.
- Look for pipelines that transcode bitmap subtitles into the dvdsub format, for example `-c:s dvdsub`.

## Fix

- FFmpeg 8.x: move to `8.1.3` or later.
- FFmpeg 9.x: move to `9.0.2` or later.

## Timeline

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

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-before-8.1.3-and-9-x-before-9.0.2-heap-buffer-overflow-via-dvdsubenc-c
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/8702f12c9daa199cc4d7c17164b13c3cdcdc2436

## From the sources

FFmpeg before 8.1.3 and 9.x before 9.0.2 contains a heap buffer overflow vulnerability in the DVD subtitle encoder that underestimates RLE output size for odd-width rectangles. Attackers can supply files with crafted bitmap subtitles that, when transcoded to the dvdsub encoder, write past the output buffer and corrupt heap memory.

---

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