Skip to main content

OpenCV EUVDEUVD-2026-135763

| CVE-2026-137083 MEDIUM
Out-of-bounds Read (CWE-125)
2026-11-25 VulnCheck GHSA-qc46-3cj7-2qc9
5.8
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious grayscale pixel content
  2. Exploit
    Target app encodes grayscale frame via built-in MJPEG encoder
  3. Execution
    Faulty level shift drives out-of-bounds cat_table/huff_dc_tab lookups
  4. Impact
    Adjacent or uninitialized memory leaked into output file or process crash

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK

1 technique across 1 tactic: Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The host application must use OpenCV's built-in MJPEG encoder (CAP_OPENCV_MJPEG / VideoWriter with MJPG fourcc) to write single-channel grayscale frames (isColor=false), and the attacker must control the pixel content of those frames; the flaw is in the encoder/writer path, not the decoder. Exploitation is limited by the local attack vector (AV:L), required passive user interaction (UI:P), a specific attack requirement and high complexity (AT:P/AC:H) meaning the vulnerable grayscale-MJPEG encoding code path must actually be exercised with attacker-influenced data, and it affects OpenCV 3.0.0-4.14.0 and 5.0.0-5.1.0; impact is a small memory disclosure into the output file or a process crash rather than code execution. Updating to the patched version is the complete fix.

Impact

Signals point to a genuine but low-urgency issue. The CVSS 4.0 score of 5.8 (medium) reflects a hard-to-reach local path: AV:L (local), AC:H (high complexity), AT:P (a specific attack requirement must hold), PR:N (no privileges) and UI:P (passive user interaction), with impact limited to VC:L (small memory leak) and VA:H (process crash/DoS). It is not a remote-unauthenticated RCE. No CISA KEV listing is present and no EPSS probability was supplied, so there is no evidence of active or at-scale exploitation; the vendor/aggregator Decision label is this_month, i.e. patch on a normal maintenance cadence rather than an emergency. No weaponized public exploit was provided, though the upstream fix commit and a new regression test publicly disclose the exact trigger, which modestly raises the chance of a PoC emerging. Net: a real but moderate-priority bug whose risk is bounded by the local vector, high complexity, and the narrow precondition that the host application must encode attacker-controlled single-channel grayscale frames with OpenCV's built-in MJPEG encoder. EPSS was not provided in the input and should be checked to refine prioritization.

Exploit ScenarioDerived

An application that re-encodes user-supplied single-channel grayscale frames to MJPEG via OpenCV's built-in VideoWriter processes attacker-crafted pixel content; the incorrect level shift in convertToYUV() drives unchecked cat_table and huff_dc_tab lookups out of bounds, writing adjacent or uninitialized process memory into the output video file or crashing the encoder. No weaponized public exploit was identified, but the upstream fix (PR #31094) and its regression test reveal the precise trigger. The local vector, required user interaction, and high attack complexity make reliable, repeatable exploitation difficult.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 25, 2026

An out-of-bounds read in OpenCV's built-in MJPEG encoder lets an attacker who controls the pixel content of single-channel grayscale frames written to MJPEG video cause adjacent or uninitialized memory to be copied into the resulting file, or crash the process. The flaw affects OpenCV 3.0.0 through 4.14.0 and 5.0.0 through 5.1.0, but only when a host application uses the built-in encoder (CAP_OPENCV_MJPEG, VideoWriter with the MJPG fourcc) with isColor=false, so the vulnerable code path must actually be exercised with attacker-influenced data; the CVSS 4.0 score of 5.8 reflects a local attack vector, high attack complexity, a specific attack pre-condition and passive user interaction, with limited confidentiality impact and high availability impact rather than code execution. No public exploit has been identified at time of analysis, and OpenCV has published upstream fixes. Exploitation requires the victim application to encode attacker-supplied grayscale frames, which makes exposure highly deployment-specific.

RemediationAI

Patch available per vendor advisory: OpenCV has released upstream fixes for the convertToYUV() level shift in pull request 31094 (commit a85f8a0de94a0fbdb7d7fef51cb5132299cf35d1) with the companion change in pull request 29859, referenced from https://github.com/opencv/opencv/pull/31094 and https://github.com/opencv/opencv/pull/29859; installing a build that contains these commits is the complete fix per the assessment, and the upstream advisory should be checked for the exact release that carries them since no discrete patched version number is stated in the available data. Because the bug is only reachable when CAP_OPENCV_MJPEG encodes single-channel grayscale frames, an interim compensating control is to avoid writing grayscale (isColor=false) MJPEG through the built-in encoder in any workflow where frame pixel content comes from untrusted or third-party sources, for example by converting frames to a three-channel format before writing or by using a different VideoWriter backend; the trade-offs are higher memory and CPU cost for the color conversion and possible behavioral differences or reduced portability with alternate backends. Since exploitation also requires the attacker to control pixel data fed to the encoder, restricting that data flow reduces exposure, but updating remains the only complete remediation.

Affected VersionsENISA

opencv 5.0.0 ≤5.1.0
opencv 3.0.0 ≤4.14.0

Affected Packages

euvd opencv no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

OpenCV's MJPEG writer lives in modules/videoio/src/cap_mjpeg_encoder.cpp and its convertToYUV() helper performs the RGB-to-YUV level shift before DCT coding. For the single-channel (grayscale) branch the encoder applied pix_data[j]*4 - 128*4 instead of the correct pix_data[j] - 128, scaling the luma values by four so that coefficients fell far outside the range the Huffman tables were sized for. The subsequent quantization step then indexes cat_table and huff_dc_tab without validating the resulting category, producing an out-of-bounds read (CWE-125) of adjacent or uninitialized memory that is emitted into the encoded bitstream, or an invalid table access that terminates the process. The published fix in pull request 31094 changes the expression to (short)(pix_data[j] - 128) and adds a Videoio_MJPEG_Gray roundtrip regression test over quality settings 75, 90 and 100; related changes are tracked in pull request 29859 and commit a85f8a0de94a0fbdb7d7fef51cb5132299cf35d1. The defect is strictly in the encoder/writer path, not the decoder, and the trigger is exercised only when grayscale frames are encoded through CAP_OPENCV_MJPEG.

Know when Opencv gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 5.8 MEDIUM
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Local grayscale-MJPEG encoding path with attacker-controlled pixels but requiring the app to invoke that encoding (AV:L/AC:H/UI:R), unauthenticated input (PR:N), small memory leak (C:L) and crash (A:H), no scope change.

3.1 AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:H
4.0 AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:N/VA:H/SC:N/SI:N/SA:N
Red Hat 5.3 MEDIUM

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
High
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
High
OpenCV is an extremely popular computer-vision library, broadly deployed but not universal
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
High

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Opencv

View all
CVE-2017-12606 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has an out-of-bounds write error in the function FillColorRow4

CVE-2016-1516 HIGH POC
8.8 Apr 10

OpenCV 3.0.0 has a double free issue that allows attackers to execute arbitrary code. Rated high severity (CVSS 8.8), th

CVE-2017-12601 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has a buffer overflow in the cv::BmpDecoder::readData function

CVE-2017-12605 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has an out-of-bounds write error in the FillColorRow8 function

CVE-2017-12604 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has an out-of-bounds write error in the FillUniColor function i

CVE-2017-12603 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has an invalid write in the cv::RLByteStream::getBytes function

CVE-2017-12597 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has an out-of-bounds write error in the function FillColorRow1

CVE-2017-12599 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has an out-of-bounds read error in the function icvCvt_BGRA2BGR

CVE-2017-12598 HIGH POC
8.8 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has an out-of-bounds read error in the cv::RBaseStream::readBlo

CVE-2019-14491 HIGH POC
8.2 Aug 01

An issue was discovered in OpenCV before 3.4.7 and 4.x before 4.1.1. Rated high severity (CVSS 8.2), this vulnerability

CVE-2017-12602 HIGH POC
7.5 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has a denial of service (memory consumption) issue, as demonstr

CVE-2017-12600 HIGH POC
7.5 Aug 07

OpenCV (Open Source Computer Vision Library) through 3.3 has a denial of service (CPU consumption) issue, as demonstrate

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy