CVE-2017-17760: Buffer Overflow in OpenCV

opencv-python Updated 02 Oct 2025

Summary

12/10/2021
Yes i
Moderate
6.5

CVE-2017-17760: Improper Restriction of Operations within the Bounds of a Memory Buffer in OpenCV. Affects opencv-python versions < 3.4.0.12. Fixed in 3.4.0.12. How to fix ↓

Also tracked for

The same CVE-2017-17760 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

OpenCV is an open-source computer vision library that provides various functions and algorithms for image and video processing. It is widely used in applications such as robotics, surveillance, and augmented reality. OpenCV 3.3.1, specifically opencv-python and opencv-contrib-python versions 3.3.1.11, is affected by a buffer overflow vulnerability in the cv::PxMDecoder::readData function in grfmt_pxm.cpp. This vulnerability arises due to the incorrect usage of a size value.

Vulnerability Detail

The buffer overflow vulnerability in OpenCV 3.3.1 can be exploited by an attacker to overwrite adjacent memory locations, potentially leading to arbitrary code execution or a system crash. The vulnerability is rated as moderate severity with a CVSS score of 6.5. It falls under the Common Weakness Enumeration (CWE) category CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.

How To Fix

Minimum fixed version

3.4.0.12

This is the first release that contains the fix.

pip install --upgrade "opencv-python==3.4.0.12"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround provided for this vulnerability. It is recommended to apply the fix by updating the affected packages.

Conclusion

OpenCV 3.3.1 (opencv-python and opencv-contrib-python versions 3.3.1.11) is affected by a buffer overflow vulnerability. To mitigate the risk, users should update the packages to version 3.4.0.12 or higher. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for opencv-python →

Share this vulnerability

FAQ

OpenCV is an open-source computer vision library used for image and video processing.

The vulnerability can allow an attacker to execute arbitrary code or cause a system crash.

The vulnerability is rated as moderate severity with a CVSS score of 6.5.

To fix this vulnerability, update the affected packages to version 3.4.0.12 or higher.

No specific workaround is provided. It is recommended to update the affected packages.

Related vulnerabilities

Recent vulnerabilities recorded for opencv-python.

How To Fix

Minimum fixed version

3.4.0.12

This is the first release that contains the fix.

pip install --upgrade "opencv-python==3.4.0.12"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback