Out-of-bounds Read in OpenCV
Published 12 Oct 2021 · Updated 10 Sept 2026
Is your project on an affected opencv-python?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <3.3.1.11
- Fixed in
- 3.3.1.11
pip install 'opencv-python>=3.3.1.11'- Affected
- <3.3.1.11
- Fixed in
- 3.3.1.11
pip install 'opencv-contrib-python>=3.3.1.11'Details
OpenCV (Open Source Computer Vision Library) through 3.3 (corresponding to OpenCV-Python 3.3.0.9) has an out-of-bounds read error in the cv::RBaseStream::readBlock function in modules/imgcodecs/src/bitstrm.cpp when reading an image file by using cv::imread, as demonstrated by the 8-opencv-invalid-read-fread test case.
Is GHSA-33h2-69j3-r336 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected opencv-python, and gives you the command that fixes it.
More advisories for opencv-python
- HighGHSA-qr4w-53vh-m672opencv-python bundled libwebp binaries in wheels that are vulnerable to CVE-2023-4863 · 30 Aug 2024
- LowPYSEC-2023-183No summary published · 29 Sept 2023
- MediumCVE-2018-5268Out-of-bounds Write in OpenCV. · 12 Oct 2021
- HighCVE-2019-5064Out-of-bounds Write in OpenCV · 12 Oct 2021
- HighCVE-2019-5063Out-of-bounds Write in OpenCV · 12 Oct 2021
- MediumCVE-2019-19624Out-of-bounds Read in OpenCV · 12 Oct 2021
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2017-12598
- Linkgithub.com/opencv/opencv/issues/9309
- Linkgithub.com/opencv/opencv/pull/9376
- Packagegithub.com/opencv/opencv-python
- Linkgithub.com/opencv/opencv-python/releases/tag/11
- Linkgithub.com/opencv/opencv-python/releases/tag/9
- Linkgithub.com/xiaoqx/pocs/blob/master/opencv.md
- Linklists.debian.org/debian-lts-announce/2018/07/msg00030.html
- Linklists.debian.org/debian-lts-announce/2021/10/msg00028.html
- Linksecurity.gentoo.org/glsa/201712-02
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.