Description
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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| — | OpenCV | OpenCV 4.1.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | opencv | 4.2.0+dfsg-3 | — |
| Debian 13 | opencv | 4.2.0+dfsg-3 | — |
| Debian 12 | opencv | 4.2.0+dfsg-3 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | opencv-contrib-python | < 4.2.0.32 | 4.2.0.32 | GHSA-q799-q27x-vp7w |
| PyPI | opencv-contrib-python-headless | < 4.2.0.32 | 4.2.0.32 | GHSA-q799-q27x-vp7w |
| PyPI | opencv-python | < 4.2.0.32 | 4.2.0.32 | GHSA-q799-q27x-vp7w |
| PyPI | opencv-python-headless | < 4.2.0.32 | 4.2.0.32 | GHSA-q799-q27x-vp7w |