Buffer overflow in OpenCV
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-120 and the CVSS impact.
Summary
An exploitable heap buffer overflow vulnerability exists in the data structure persistence functionality of OpenCV, before version 4.2.0. A specially crafted JSON file can cause a buffer overflow, resulting in multiple heap corruptions and potentially code execution. An attacker can provide a specially crafted file to trigger this vulnerability.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | OpenCV | OpenCV 4.1.0 | — | No fix listed | CNA |
| — | opencv-python (PyPI) | before 4.2.0.32 | 4.2.0.32 | Patch available | GHSA-q799-q27x-vp7w |
| — | opencv-python-headless (PyPI) | before 4.2.0.32 | 4.2.0.32 | Patch available | GHSA-q799-q27x-vp7w |
| — | opencv-contrib-python (PyPI) | before 4.2.0.32 | 4.2.0.32 | Patch available | GHSA-q799-q27x-vp7w |
| — | opencv-contrib-python-headless (PyPI) | before 4.2.0.32 | 4.2.0.32 | Patch available | GHSA-q799-q27x-vp7w |
- OpenCV Vendor— Affected OpenCV 4.1.0 Fixed in — No fix listed CNA
- opencv-python (PyPI) Vendor— Affected before 4.2.0.32 Fixed in 4.2.0.32 Patch available GHSA-q799-q27x-vp7w
- opencv-python-headless (PyPI) Vendor— Affected before 4.2.0.32 Fixed in 4.2.0.32 Patch available GHSA-q799-q27x-vp7w
- opencv-contrib-python (PyPI) Vendor— Affected before 4.2.0.32 Fixed in 4.2.0.32 Patch available GHSA-q799-q27x-vp7w
- opencv-contrib-python-headless (PyPI) Vendor— Affected before 4.2.0.32 Fixed in 4.2.0.32 Patch available GHSA-q799-q27x-vp7w
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:opencv:opencv:*:*:*:*:*:*:*:* | 4.0.0 to before 4.2.0 | Vulnerable | OpenCV |
| cpe:2.3:a:oracle:application_testing_suite:13.3.0.1:*:*:*:*:*:*:* | 13.3.0.1 | Vulnerable | Oracle |
| cpe:2.3:a:oracle:big_data_spatial_and_graph:*:*:*:*:*:*:*:* | before 2.0 | Vulnerable | Oracle |
| cpe:2.3:a:oracle:enterprise_manager_base_platform:13.4.0.0:*:*:*:*:*:*:* | 13.4.0.0 | Vulnerable | Oracle |
- cpe:2.3:a:opencv:opencv:*:*:*:*:*:*:*:* Versions 4.0.0 to before 4.2.0 Vulnerable ·OpenCV
- cpe:2.3:a:oracle:application_testing_suite:13.3.0.1:*:*:*:*:*:*:* Versions 13.3.0.1 Vulnerable ·Oracle
- cpe:2.3:a:oracle:big_data_spatial_and_graph:*:*:*:*:*:*:*:* Versions before 2.0 Vulnerable ·Oracle
- cpe:2.3:a:oracle:enterprise_manager_base_platform:13.4.0.0:*:*:*:*:*:*:* Versions 13.4.0.0 Vulnerable ·Oracle
Remediation
- Fix · GHSA-q799-q27x-vp7w opencv-python (PyPI) Fixed in 4.2.0.32 Advisory →
- Fix · GHSA-q799-q27x-vp7w opencv-python-headless (PyPI) Fixed in 4.2.0.32 Advisory →
- Fix · GHSA-q799-q27x-vp7w opencv-contrib-python (PyPI) Fixed in 4.2.0.32 Advisory →
- Fix · GHSA-q799-q27x-vp7w opencv-contrib-python-headless (PyPI) Fixed in 4.2.0.32 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
Not affected: 3 products
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Timeline
- 2026-10-02 Threatist record created from CVE-2019-5064
- 2026-10-03 Alias added: GHSA-q799-q27x-vp7w
References
Patch 2
Advisory 2
Sources
- CVE-2019-5064 · CVE Program
- CVE-2019-5064 · NVD
- FIRST EPSS
- GHSA-q799-q27x-vp7w · GitHub Advisory Database · CC BY 4.0
- CVE-2019-5064 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences