CVE-2017-12862: Improper Restriction of Operations within the Bounds of a Memory Buffer in OpenCV
8.8
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.76396%
CWE
Published
10/12/2021
Updated
2/1/2023
KEV Status
No
Technology
Python
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
opencv-python | pip | <= 3.3.0.9 | 3.3.1.11 |
opencv-contrib-python | pip | <= 3.3.0.9 | 3.3.1.11 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the buffer allocation logic in cv::PxMDecoder::readData() where src_pitch is miscalculated. The GitHub issue #9370 explicitly shows a crash in this function at line 237 during src[x] writes, with m_width significantly larger than src_pitch. The CVE description confirms this leads to copy buffer overflow. The patch in OpenCV 3.3.1.11 (via PR #9376) would logically address this buffer size calculation.