---
id: "CVE-2026-125232"
page: "https://infrastack.ai/live/CVE-2026-125232"
kind: "vulnerability"
aliases: ["CVE-2026-125232"]
title: "FFmpeg: crafted timestamps crash B-frame encoding with a division by zero"
severity: "medium"
cvss: 6.8
epss: null
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["ffmpeg", "media-processing", "runtime", "transcoding"]
not_affected_if: ["encoders-unused", "no-untrusted-input"]
published_at: "2026-11-09T19:17:01+00:00"
first_seen_at: "2026-11-09T19:28:20+00:00"
updated_at: "2026-11-09T19:30:28+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125232", "first_seen_at": "2026-11-09T19:28:20+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted timestamps crash B-frame encoding with a division by zero

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

FFmpeg through 9.0.2 truncates frame timestamp distances to 16 bits in estimate_motion_b() in libavcodec, so a division by zero occurs. An attacker who supplies input with timestamp gaps that are multiples of 65536 can crash MPEG-4 Part 2 or MPEG-1/2 B-frame encoding with SIGFPE.

_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 it affects versions through `9.0.2`.
- Look for services that run FFmpeg encoders on untrusted input, such as media upload or transcoding pipelines.

## Fix

- Move to a FFmpeg release that includes the upstream patch; the exact fixed version is unknown from the sources.

## Timeline

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

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-division-by-zero-in-b-frame-motion-estimation
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/16d19ccbce802634662a9bf18a5679cf27da2848
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/bf0a2e4680df92d8de6514090d350152eb7845b8

## From the sources

FFmpeg through 9.0.2 contains a division by zero vulnerability in estimate_motion_b() in libavcodec/motion_est.c, caused by frame timestamp distances truncated to 16 bits. Attackers can supply input with timestamp gaps that are multiples of 65536, crashing MPEG-4 Part 2 or MPEG-1/2 B-frame encoding with SIGFPE.

---

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