CVE-2026-137083: OpenCV 3.0.0 through 4.14.0 and 5.0.0 through 5.1.0 MJPEG Encoder Out-of-Bounds Read
OpenCV 3.0.0 through 4.14.0 and 5.0.0 through 5.1.0 contains an out-of-bounds read vulnerability in the built-in MJPEG encoder when writing grayscale frames due to incorrect level shifting in convertToYUV(). Attackers controlling pixel content written as grayscale MJPEG video can trigger unchecked cattable and huffdctab lookups, leaking adjacent or uninitialized memory into the output file or crashing the process.
Affected Software
Event History
Frequently Asked Questions
Who is realistically exposed to this issue?
Applications using affected OpenCV versions that encode grayscale frames to MJPEG are exposed when an attacker can control the pixel content of frames being written. Workloads that do not use the built-in MJPEG encoder for grayscale video are not described as affected.
What does an attacker need to exploit it?
The attacker needs to control pixel content supplied as grayscale MJPEG video input to the encoding operation. The CVSS vector also indicates local access, high attack complexity, no privileges required, and user interaction is required.
What could happen if exploitation succeeds?
Unchecked cat_table and huff_dc_tab lookups can cause adjacent or uninitialized process memory to be included in the generated output file. The condition can also crash the affected process.
How can I determine whether an application is affected?
Check whether the application uses OpenCV versions 3.0.0 through 4.14.0 or 5.0.0 through 5.1.0, invokes the built-in MJPEG encoder, and writes grayscale frames. The provided data does not identify a runtime detection method or a temporary mitigation.