CVE-2026-137910: FFmpeg before 9.1 Out-of-Bounds Read via PCX Encoder Odd-Width Rows
FFmpeg before 9.1 contains an out-of-bounds read vulnerability in pcxencodeframe() in libavcodec/pcxenc.c that rounds each row up to an even number of bytes and run-length encodes that many bytes from the input frame. Attackers who control the width of images encoded to PCX by an application that supplies tightly packed frames can make the encoder read past the end of the frame buffer, crashing the application or leaking heap contents into the output image.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using FFmpeg versions before 9.1 to encode PCX images are exposed when they provide tightly packed input frames. The issue is relevant where an attacker can influence the width of an image submitted for PCX encoding.
What does an attacker need to do to trigger it?
The attacker needs to cause the application to encode a PCX image with an attacker-controlled odd width and a tightly packed frame buffer. Exploitation also requires user interaction, as reflected in the supplied CVSS vector.
What is the impact of a successful trigger?
The encoder can read beyond the end of the input frame buffer. This can crash the application or copy heap contents into the generated PCX image, exposing data.
How can I tell whether my application is affected?
Check whether it uses FFmpeg before 9.1 and invokes the PCX encoder. It is specifically affected when the encoder receives tightly packed frames whose image width can be odd.
What should be done if upgrading is not immediately possible?
Avoid encoding attacker-influenced, odd-width images to PCX with tightly packed input frames. Preventing PCX encoding for such inputs removes the described trigger condition.