VDB
Sign up
MEDIUM6.5

PYSEC-2026-2824

Out-of-bounds Read in OpenCV

Quick fix

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

pip install --upgrade 'opencv-python>=4.1.0.25'

Details

An out-of-bounds read was discovered in OpenCV before 4.1.1 (OpenCV-Python before 4.1.0.25). Specifically, variable coarsest_scale is assumed to be greater than or equal to finest_scale within the calc()/ocl_calc() functions in dis_flow.cpp. However, this is not true when dealing with small images, leading to an out-of-bounds read of the heap-allocated arrays Ux and Uy.

Are you affected?

Enter the version of the package you're using.

Affected packages

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

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:pypi/opencv-python"]}'