CVE-2017-12602: Opencv python Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-pqjj-6f5q-gqph
CVSS 7.5
Published
Advisory Summary

CVE-2017-12602 is a HIGH (CVSS 7.5) denial of service vulnerability (General Security Weakness) affecting Opencv python libraries in the PyPI ecosystem. The issue involves denial of service in opencv. Remediation is available by upgrading affected packages to version 3.3.1.11.

CVE-2017-12602 at a Glance

CVE Identifier CVE-2017-12602
GHSA Identifier GHSA-pqjj-6f5q-gqph
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification General Security Weakness
Affected Product Opencv python
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2017-12602

To remediate this vulnerability, upgrade all affected Opencv python dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

opencv-python fixed: 3.3.1.11
pip install opencv-python>=3.3.1.11
opencv-contrib-python fixed: 3.3.1.11
pip install opencv-contrib-python>=3.3.1.11
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show opencv-python

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2017-12602, inspect your installed packages using pip:

pip show opencv-python

Analyze the terminal output to locate any version of Opencv python in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.3.1.11), your application is affected.

Note: The pip show opencv-python command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Opencv python, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

OpenCV (Open Source Computer Vision Library) through 3.3 (corresponding to OpenCV-Python 3.3.0.9) has a denial of service (memory consumption) issue, as demonstrated by the 10-opencv-dos-memory-exhaust test case.

CVE-2017-12602 Affected Opencv python Versions

2 component(s)
Fixed Versions:
3.3.1.11
Product / Package Ecosystem Affected Versions Fixed Version
opencv-python
PyPI
< 3.3.1.11
3.3.1.11
opencv-contrib-python
PyPI
< 3.3.1.11
3.3.1.11

References

Frequently Asked Questions

What is CVE-2017-12602?
CVE-2017-12602 is a security vulnerability in Opencv python involving Denial of Service in OpenCV under General Security Weakness.
Which Opencv python versions are affected?
Affected versions include releases prior to 3.3.1.11 across affected packages: opencv-python, opencv-contrib-python.
What version fixes CVE-2017-12602?
Upgrading to 3.3.1.11 (or the latest patched release for your respective branch) resolves the vulnerability.
Is opencv-python affected?
Yes, opencv-python is affected in releases prior to 3.3.1.11. Upgrade your dependency to 3.3.1.11 or later.
Is opencv-contrib-python affected?
Yes, opencv-contrib-python is affected in releases prior to 3.3.1.11. Upgrade your dependency to 3.3.1.11 or later.
What is the CVSS score of CVE-2017-12602?
CVE-2017-12602 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2017-12602?
CVE-2017-12602 is classified under General Security Weakness.
How can I check PyPI dependencies for CVE-2017-12602?
Run the dependency tree command: 'pip show opencv-python'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pqjj-6f5q-gqph",
  "modified" : "2021-10-08T14:35:41Z",
  "published" : "2021-10-12T22:01:34Z",
  "aliases" : [ "CVE-2017-12602" ],
  "summary" : "Denial of Service in OpenCV",
  "details" : "OpenCV (Open Source Computer Vision Library) through 3.3 (corresponding to OpenCV-Python 3.3.0.9) has a denial of service (memory consumption) issue, as demonstrated by the 10-opencv-dos-memory-exhaust test case.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "opencv-python"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.1.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.3.0.9"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "opencv-contrib-python"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.3.1.11"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.3.0.9"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-12602"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencv/opencv/issues/9311"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/opencv/opencv/pull/9376"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/opencv/opencv-python"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xiaoqx/pocs/blob/master/opencv.md"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201712-02"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-08T14:35:41Z",
    "nvd_published_at" : null
  }
}