CVE-2026-125261: FFmpeg through 9.0.2 SGI Encoder Out-of-Bounds Read via sgienc.c
FFmpeg through 9.0.2 contains an out-of-bounds read vulnerability in the SGI encoder's encodeframe() 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
alpine/ffmpegto a version that resolves this vulnerability.Fixed in 8.1.4-r0
Event History
Frequently Asked Questions
What conditions are required to trigger the issue?
An attacker must provide a video whose display matrix causes autorotation to apply a vertical flip, and the video must then be transcoded to SGI images. The vulnerable path is the SGI encoder's encode_frame() function.
What is the practical impact during transcoding?
The encoder can read pixel data far outside the intended frame buffer and crash the FFmpeg process. The provided data identifies an out-of-bounds read and process crash; it does not establish further impact.
Are deployments that do not produce SGI images exposed through this path?
The described vulnerable operation specifically requires transcoding to SGI images through the SGI encoder. Based on the available information, workflows that do not invoke that encoder are not exposed to this trigger path.