Miggo Logo

CVE-2017-17760: Improper Restriction of Operations within the Bounds of a Memory Buffer in OpenCV

6.5

CVSS Score
3.0

Basic Information

EPSS Score
0.79517%
Published
10/12/2021
Updated
2/1/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
opencv-pythonpip<= 3.3.1.113.4.0.12
opencv-contrib-pythonpip<= 3.3.1.113.4.0.12

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability description explicitly identifies cv::PxMDecoder::readData in grfmt_pxm.cpp as the vulnerable function. The GitHub commit diff shows the fix involved changing the memcpy size parameter from CV_ELEM_SIZE1(m_type) to img.elemSize1(), confirming the root cause was an incorrect size calculation. The ASAN error trace in the GitHub issue demonstrates a heap-buffer-overflow occurring in this function during memory copy operations. All primary sources (CVE, GHSA, commit diff, and issue tracker) consistently point to this single function as the vulnerability location.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Op*n*V *.*.* (*orr*spon*in* wit* op*n*v-pyt*on *n* op*n*v-*ontri*-pyt*on *.*.*.**) **s * *u***r Ov*r*low in t** *v::PxM***o**r::r*****t* *un*tion in *r*mt_pxm.*pp, ****us* *n in*orr**t siz* v*lu* is us**.

Reasoning

T** vuln*r**ility **s*ription *xpli*itly i**nti*i*s *v::PxM***o**r::r*****t* in *r*mt_pxm.*pp *s t** vuln*r**l* *un*tion. T** *it*u* *ommit *i** s*ows t** *ix involv** ***n*in* t** m*m*py siz* p*r*m*t*r *rom *V_*L*M_SIZ**(m_typ*) to im*.*l*mSiz**(),