ADVISORIES

PyPA Advisory Database

PYSEC-2026-2802

Out-of-bounds Write in OpenCV

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.

Affected packages

EcosystemPackageAffected versions
PyPIopencv-contrib-python
All versions before 4.2.0.32 (fixed in 4.2.0.32)

References