VDB
Sign up
MEDIUM5.9

PYSEC-2026-2799

Divide By Zero in OpenCV.

Quick fix

PYSEC-2026-2799 — opencv-contrib-python: upgrade to the fixed version with the command below.

pip install --upgrade 'opencv-contrib-python>=4.1.1.26'

Details

An issue was discovered in OpenCV 4.1.0 (OpenCV-Python 4.1.0.25). There is a divide-by-zero error in cv::HOGDescriptor::getDescriptorSize in modules/objdetect/src/hog.cpp.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/opencv-contrib-python
Introduced in: 0Fixed in: 4.1.1.26
Fixpip install --upgrade 'opencv-contrib-python>=4.1.1.26'

References