Preliminary notice: published right away from the original source data, without editorial write-up. It will shortly be replaced by a written and reviewed version.
Summary
CVE-2026-137083: medium-severity vulnerability (CVSS 5.8) in OpenCV OpenCV.
What happened
Original description from the source: 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 cat_table and huff_dc_tab lookups, leaking adjacent or uninitialized memory into the output file or crashing the process.
Why it matters
Medium severity, CVSS 5.8.
Affected products and versions
OpenCV OpenCV >= 3.0.0, <= 4.14.0; OpenCV OpenCV >= 5.0.0, <= 5.1.0
| Product | Versions | Fixed in |
|---|---|---|
| OpenCV OpenCV | >= 3.0.0, <= 4.14.0 | — |
| OpenCV OpenCV | >= 5.0.0, <= 5.1.0 | — |
Action recommended by the source
See the official references for the fix or mitigation.
Sources and references
- https://github.com/opencv/opencv/pull/31094 — CVE Program
- https://github.com/opencv/opencv/commit/a85f8a0de94a0fbdb7d7fef51cb5132299cf35d1 — CVE Program
- https://github.com/opencv/opencv/pull/29859 — CVE Program
- https://github.com/opencv/opencv/blob/4.14.0/modules/videoio/src/cap_mjpeg_encoder.cpp#L1140 — CVE Program
- https://github.com/opencv/opencv/blob/4.14.0/modules/videoio/src/cap_mjpeg_encoder.cpp#L1308 — CVE Program
- https://www.vulncheck.com/advisories/opencv-3.0.0-through-4.14.0-and-5.0.0-through-5.1.0-mjpeg-encoder-out-of-bounds-read — CVE Program
Weaknesses (CWE): CWE-125
Relevant change history
Published
Preliminary advisory published.