HIGH8.8
PYSEC-2026-2841
Out-of-bounds Write in OpenCV
Quick fix
PYSEC-2026-2841 — opencv-python-headless: upgrade to the fixed version with the command below.
pip install --upgrade 'opencv-python-headless>=4.2.0.32'Details
An exploitable heap buffer overflow vulnerability exists in the data structure persistence functionality of OpenCV, version 4.1.0 (corresponds with OpenCV-Python version 4.1.2.30). 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.
Are you affected?
Enter the version of the package you're using.
Affected packages
PyPI/opencv-python-headless
Introduced in:
0Fixed in: 4.2.0.32Fix
pip install --upgrade 'opencv-python-headless>=4.2.0.32'References
- https://nvd.nist.gov/vuln/detail/CVE-2019-5064[ADVISORY]
- https://github.com/opencv/opencv/issues/15857[WEB]
- https://github.com/opencv/opencv-python[PACKAGE]
- https://github.com/opencv/opencv-python/releases/tag/32[WEB]
- https://github.com/opencv/opencv/releases/tag/4.2.0[WEB]
- https://talosintelligence.com/vulnerability_reports/TALOS-2019-0853[WEB]
- https://www.oracle.com//security-alerts/cpujul2021.html[WEB]
- https://www.oracle.com/security-alerts/cpuApr2021.html[WEB]
- https://pypi.org/project/opencv-python-headless[PACKAGE]
- https://github.com/advisories/GHSA-q799-q27x-vp7w[ADVISORY]