Out-of-bounds Read in OpenCV
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | opencv-contrib-python | < 4.1.0.25 | 4.1.0.25 |
| Python (PyPI) | opencv-contrib-python-headless | < 4.1.0.25 | 4.1.0.25 |
| Python (PyPI) | opencv-python | < 4.1.0.25 | 4.1.0.25 |
| Python (PyPI) | opencv-python-headless | < 4.1.0.25 | 4.1.0.25 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-19624
- https://github.com/opencv/opencv/issues/14554
- https://github.com/opencv/opencv/commit/d1615ba11a93062b1429fce9f0f638d1572d3418
- https://access.redhat.com/security/cve/cve-2019-19624
- https://github.com/opencv/opencv-python
- https://github.com/opencv/opencv-python/releases/tag/25
- https://pypi.org/project/opencv-contrib-python
- https://github.com/advisories/GHSA-jggw-2q6g-c3m6
- https://pypi.org/project/opencv-python
- https://pypi.org/project/opencv-python-headless
- https://pypi.org/project/opencv-contrib-python-headless
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L- Weakness (CWE)
CWE-125- Platform
- Python (PyPI)
- Package
opencv-contrib-python, opencv-contrib-python-headless, opencv-python- Disclosed
- 12.10.2021
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-723 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2026-2800 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2026-2824 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2026-2839 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-jggw-2q6g-c3m6 - CC BY 4.0
Vulnerability history: opencv-python
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 32
- First → latest
- 10.2021 08.2024
- Without a fix
- 2
- Exploited in attacks
- 0
Severity breakdown
- High 23
- Medium 8
- Unrated 1
Disclosures per year
- 2021: 30
- 2022: 0
- 2023: 1
- 2024: 1
- 2025: 0
- 2026: 0
-
Out-of-bounds Read in OpenCV this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.