---
id: "CVE-2026-125261"
page: "https://infrastack.ai/live/CVE-2026-125261"
kind: "vulnerability"
aliases: ["CVE-2026-125261"]
title: "FFmpeg: crafted video makes SGI encoder read out of bounds"
severity: "medium"
cvss: 6.9
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "FFmpeg", "fixed": [], "affected": "", "ecosystem": "vendor"}]
ecosystems: ["vendor"]
tags: ["ffmpeg", "media-processing", "package", "transcoding"]
not_affected_if: ["no-sgi-output", "no-untrusted-video-input"]
published_at: "2026-11-09T20:18:12+00:00"
first_seen_at: "2026-11-09T20:48:13+00:00"
updated_at: "2026-11-09T20:49:48+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-125261", "first_seen_at": "2026-11-09T20:48:13+00:00"}]
exploit_sources: []
---

# FFmpeg: crafted video makes SGI encoder read out of bounds

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

FFmpeg's SGI image encoder in libavcodec mishandles negative linesize values through unsigned size variables, causing an out-of-bounds read. An attacker who supplies a crafted video with a display matrix that triggers autorotate vertical flip can crash the process while it transcodes to SGI images.

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

## Affected

- vendor:FFmpeg affected range not listed fixed no fixed version listed

## How to check

- Check whether the installed FFmpeg version is `9.0.2` or earlier, for example with `ffmpeg -version`
- Look for services that transcode untrusted uploaded video to SGI output

## Timeline

- 2026-11-09T20:48:13+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-125261

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/ffmpeg-through-9.0.2-sgi-encoder-out-of-bounds-read-via-sgienc-c
- [fix] Patch: github.com https://github.com/FFmpeg/FFmpeg/commit/c6e5b6105aa13f6b0df2a646da608078cfe52d79

## From the sources

FFmpeg through 9.0.2 contains an out-of-bounds read vulnerability in the SGI encoder's encode_frame() in libavcodec/sgienc.c, where unsigned size variables mis-handle negative linesize frames. Attackers can supply a video whose display matrix triggers autorotate vflip, so transcoding to SGI images reads pixel data far outside the frame and crashes the process.

---

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