CVE-2026-137911: FFmpeg before 9.1 Out-of-Bounds Read via XWD Encoder Scanline Padding
FFmpeg before 9.1 contains an out-of-bounds read vulnerability in xwdencodeframe() in libavcodec/xwdenc.c that copies each RGB24 or BGR24 row using the padded XWD scanline size instead of the pixel row size. Attackers who control the width of video encoded to XWD by an application that supplies tightly packed frames can make the encoder read past the frame buffer, crashing the application or leaking heap contents into the output image.
Affected Software
Event History
Frequently Asked Questions
Which uses are exposed to this issue?
Applications using FFmpeg to encode RGB24 or BGR24 frames into XWD are affected when they supply tightly packed frame buffers. The issue is in the XWD encoder path, not merely in decoding or processing XWD files.
What does an attacker need to control?
An attacker needs to control the width of video encoded to XWD by the application. Exploitation also depends on the application supplying tightly packed frames to the encoder.
Are the consequences limited to a crash?
No. The out-of-bounds read can crash the application, and data read past the frame buffer may be included in the generated XWD image, potentially exposing heap contents.
What versions need remediation?
FFmpeg versions before 9.1 are affected according to the provided information. Update to FFmpeg 9.1 or later where possible.